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


Joined: 11 Oct 2000
Posts: 94
Location: United Kingdom

PostPosted: Sun Jul 27, 2003 12:11 pm   

why is this a syntax error?
 
Why is this a syntax error
#if (@test =~ @lookfor) { ......}

When this is not
#if (@test =~ "%2") { ......}

Did I miss something in the help file?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jul 27, 2003 5:29 pm   
 
The syntax checker probably wants one of them to be in double quotes. If it works, then you can ignore the syntax error. If it bothers you, then you can enclose the second one in double quotes since variable references are expanded inside of patterns.
Reply with quote
Zafrusteria
Wanderer


Joined: 11 Oct 2000
Posts: 94
Location: United Kingdom

PostPosted: Mon Jul 28, 2003 6:26 pm   
 
ah ok, can Zugg put this on his list of syntax highlighter bugs.

and while playing around with this I also found this one put both in quotes and it's always false.

#var test string
#var lookfor @test
#if ("@test" =~ "@lookfor") {#sh should be true} {#sh but always false}
#if (@test =~ @lookfor) {#sh correct but highlighter bug} {#sh and not this one}
#if (@test =~ "@lookfor") {#sh correct} {#sh never true}
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