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
fr8o
Newbie


Joined: 31 Mar 2005
Posts: 7

PostPosted: Sat Sep 08, 2007 1:33 am   

IF once again
 
I have been pounding on this for a couple of hours so I put this quickly together to get the idea accrost:

In the nice handy trigger windows of zmud I enter:


flickers

test = 6
#IF (@test!=6) {blah}

I say flickers to set it off and it says blah which it clearly should not as test does in fact = 6

What is going on??


flickers

test = 6
#IF (@test = 6) {blah}

is what I want but that returns nothing. Am I doing this wrong?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Sep 08, 2007 1:59 am   
 
Unfortunately, there's not much I can say - it's working fine for me. There must be a problem somewhere else in your script. Perhaps you have one of the words aliased?

With that said, if the latter is working for you, you can do #if (@test = 6) {} {blah} to get the same effect.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
fr8o
Newbie


Joined: 31 Mar 2005
Posts: 7

PostPosted: Sat Sep 08, 2007 2:20 am   
 
I put this in:
#TR {The fire flickers merrily.} {#ADD test 1;#IF (@test = 6) {grin;test = 0}}
It created the test var and counted it all the way to 8 before I got tired of waiting.

If given a false it goes off every time so this always evaluates as false no matter what @test is set too, I have also tried == and =~ "6" none of these work.
Reply with quote
fr8o
Newbie


Joined: 31 Mar 2005
Posts: 7

PostPosted: Sat Sep 08, 2007 2:21 am   
 
also tried a diffrent var name
Reply with quote
fr8o
Newbie


Joined: 31 Mar 2005
Posts: 7

PostPosted: Sat Sep 08, 2007 4:06 am   
 
got it! the @ was turned off in special characters!! How odd, good thing I happened to be looking through the settings thinking maybe I had somehow changed what the character for a var was :)
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