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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: Sun Nov 12, 2006 12:17 am   

[1.15] NOT BUG REPORT. Use of #pick. advice please
 
hey. ive used code similar to.. .
Code:

#PICK {p:Fly where?} {Home:@flyhome = 1} {Bank:@flybank = 1} {Outland:@flyoutland = 1}


and as im on a "fix my dodgy code binge" i thought i better fix this. zmud has always shown this as a syntax error. but it worked. so i didnt care

How can i make this work in cmud?

Thanks guys
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sun Nov 12, 2006 12:30 am   
 
The usage of #PICK seems to be right (though you might want to include o:1 to force choosing a single destination). I think this has to do with the dodgy use of

@varname = value

which creates a variable whose name is equal to the contents of @varname rather than changing @varname itself. Proper usage of that command is simply

varname = value

I think I read somewhere about this being more rigorously enforced in CMUD than in zMUD (it's always been the proper syntax). So your finished script will now look like this:

#PICK {p:Fly where?} {Home:flyhome = 1} {Bank:flybank = 1} {Outland:flyoutland = 1}

which works fine for me.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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