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


Joined: 09 Dec 2007
Posts: 58

PostPosted: Wed Dec 26, 2007 10:49 am   

variables, adding an amount to the value
 
hey, how do i add a random amount to the existing value?

i tried this
Code:
g %1 wood
  get @woodbox from pack
  put %1 wood in @woodbox
  put @woodbox in pack
  #var guildwood +%1

that changed the value to +1
not 40 +1= 41

I looked in the manual and forums, but couldn't find anything.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Wed Dec 26, 2007 10:55 am   
 
#var guildwood %eval(@guildwood+1)
or
guildwood = %eval(@guildwood+1)
or
#add guildwood 1
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
illyism
Wanderer


Joined: 09 Dec 2007
Posts: 58

PostPosted: Wed Dec 26, 2007 10:57 am   
 
ahh, thank you!
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