|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: 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 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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. |
|
|
|
|
|