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
Tommy2143
Beginner


Joined: 10 Aug 2002
Posts: 17

PostPosted: Sat Jul 12, 2003 9:08 pm   

Using the =~ expression
 
I have this code
#if (%word(@currentitem,1) =~ %d)
Which is supposed to see if the first word of @currentitem is a number
However ZMud's settings editor is telling me it's a syntax error
This worked before I upgraded to 6.62, did something change that isnt shown in the help files?

Any help is much appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jul 12, 2003 9:37 pm   
 
Actually, it doesn't determine if the first word is a number. It determines if the first word contains a number. To determine if the first word is a number, use %isnumber. This will also eliminate the editor's complaint.
#IF (%isnumber( %word( @curentitem, 1)))
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