ID:158798
 
Im having real problems with the var's on here. I've tried everything to try and define M.Frozen. it keeps telling me that M.Frozen : undefined var. I would REALLY like some help on this.

mob/Po3
verb
Freeze_Time()
set category = "Powers"
for(var/mob/M in view(src))
M.Frozen = 1
spawn(600)
M.Frozen = 0

I've already tried this (down below) but Frozen being an undefined var still comes up as and error.

mob/var
Frozen = 1

mob/var
Frozen=1

Everything I try doesn't work, but Frozen is already defined in the BS. So im wondering if you could help me to understand why, even though it's already defined somewhere else, it wont work for me

Before you make 3 posts about the same thing(which you really shouldn't do, by the way):
It's talking about M, not Frozen. The for() loop proc has a code block, so you need to indent the lines included. Same with spawn(), though you could just use sleep() instead.
In response to Kaiochao
How would I code M? I dont really understand how that would work and plus I use M in MANY other places so that would already be defined. and I've tried

mob/var
M=0

And it still comes up as M.Frozen : undefined var. and I've inmdented what you've told me.
In response to Kyubikitsune
for() loops like that make variables that only work within its code block.
for(var/mob/m in view(src))
src<<m //valid

src<<m //invalid
In response to Kaiochao
so...Like this?

for(var/mob/m in view(src))
src<<m //valid
M.Frozen = 1
sleep(600)
M.Frozen = 0
src<<m //invalid
In response to Kyubikitsune
No, you just copied and pasted my code and added yours with one too many indentations.
Consistent indentation is actually required in this programming language.
I'm not going to make your code for you. I suggest starting here. You've got a lot to learn about the language before you can do anything with it.
In response to Kaiochao
Well I know more than most people do about the language and that place you sent me was an amazing help but I still cant get the M defined. Im sorry but i've searched everywhere in the ZBT but I just CANT find out how to define that. PLZ Im just asking for help on defining the M. I really need your help.
In response to Kyubikitsune
Most people don't come to the forums searching on how to use a for() list proc.
The DM Reference is located through F1 in Dream Maker. Look up built-in procs and variables that you don't understand.

I already showed you an example of how to use it. You copy/pasted it and put your nonsense in the middle of it. I'm really not sure what you were trying to accomplish there.
In response to Kaiochao
OMG ty soooo much! I love you! It's working noww!!! Thank you for those sites you gave me, I got it to work now! Your the best Kai!
You changed busy to frozen, which means you need to go back to your variable list and add frozen or change busy to frozen.
In response to Janosalderan69
Janosa, please stop. Your advice has been wrong or irrelevant on every count so far.