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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Michael Nelson
Novice


Joined: 03 Oct 2005
Posts: 36

PostPosted: Sat Oct 11, 2008 8:48 pm   

#TRIGGER {You get &%dGold coins}
 
#TRIGGER {You get &%dGold coins}
This syntax is new to me but I like it as it seems much more semantic however here is the rub. This seems to assign the value to a global variable Gold. I don't really want to create a bunch of global variables is there a way to force these into local variable Gold in CMUD?

Thanks :)
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Oct 11, 2008 9:16 pm   
 
Yep:

You get ($gold:%d) coins

will do the same thing but for the local variable $gold.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Michael Nelson
Novice


Joined: 03 Oct 2005
Posts: 36

PostPosted: Sat Oct 11, 2008 10:13 pm   
 
Thanks
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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