Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Eric Freeman
Newbie


Joined: 11 May 2003
Posts: 5
Location: USA

PostPosted: Wed May 14, 2003 3:29 am   

If statement
 
oki i just cant get this trig to work..let me post it and explain abit about what i'm trying to do:
the pattern is
-*1 and its set to alarm...its in a folder marked tankaogcurrent and the folder gets turned on:

#AD tankaogcurrent 1
**this is takeing a var tankaogcurrent which starts out as 0 and add's 1 to it every sec**
#MATH aogwarning @aoglast-20
**this is takeing @aoglast (which is a number like say 400..and sub 20 to it and assigns that number (say 380) to a var called aogwarning**
#IF (@tankaogcurrent=@aogwarning){msg ~{@healtar~}~'s only has about 20 sec left !!}
**oki this if statement isnt working...i want that when tankaogcurrent=aogwarning...now msg is actually a command i made that checks to see if i'm in a party and either emotes or sends the message on a party channel..i didnt think that would affect anything**
#IF (@tankaogcurrent@aoglast){msg ~{@healtar~}~'s Aog ~[OFF~] --> (@aoglast secs)
#var tankaogcurrent off
#bu 19
#t- tankaogcurrent}
**this if statement..i dont think its even tried to work yet**

i hope i explained what i TRIED to do...any clues anyone ?
-Eric
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed May 14, 2003 6:41 pm   
 
Correct syntax, including SPACES, matters.

Wrong:
#IF (@tankaogcurrent=@aogwarning){msg ~{@healtar~}~'s only has about 20 sec left !!}

Right:
#IF (@tankaogcurrent=@aogwarning) {msg ~{@healtar~}~'s only has about 20 sec left !!}

You can also expect to have trouble with the next #IF.
#IF (@tankaogcurrent@aoglast){msg ~{@healtar~}~'s Aog ~[OFF~] --> (@aoglast secs)

LightBulb
Advanced Member
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net