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
nostra
Wanderer


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: Fri Sep 05, 2003 11:29 pm   

Nested #IF statement with error... need help.
 
Hi,

I have this nested #IF trigger:

#IF (%iskey( @mob_bot_list, %1)) {
#T- mob_action1
#LOO %db( @string_steps, %2) %3
kill %db( @mob_bot_list, %1)
} {execute not_true_trigger}

If it's TRUE it works fine BUT if FALSE it refuse to "execute the not_true_trigger".

Indeed, in the zMUD Script window it produce a "red" error message, reading:

#LOO %db( @string_steps, %2) %3
^ syntax error


Someone know what's going on here [?]
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Sep 05, 2003 11:36 pm   
 
you forgot a set of curly braces. These should go around the code for the #LOOpdb command you were probably wanting to use.

#LOO %db( @string_steps, %2) {%3}
Reply with quote
nostra
Wanderer


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: Fri Sep 05, 2003 11:55 pm   
 
Thanx, that sorted the error message! Smile

However, the second part of the #IF statement (if FALSE) doesn't execute (it should fire if TRUE doesn't fire)... Any ideas?
Reply with quote
nostra
Wanderer


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: Sat Sep 06, 2003 12:02 am   
 
Duh, nevermind my last posting. I was tired =)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Sep 06, 2003 12:02 am   
 
you'll have to explain a little better what it's supposed to do. Unless it's a mud command or an alias, "execute not_true_trigger" doesn't mean a thing to ZMud. Are you perhaps looking for the #EXECUTE command?
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