|
illyism Wanderer
Joined: 09 Dec 2007 Posts: 58
|
Posted: 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. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Dec 26, 2007 10:55 am |
#var guildwood %eval(@guildwood+1)
or
guildwood = %eval(@guildwood+1)
or
#add guildwood 1 |
|
|
|
illyism Wanderer
Joined: 09 Dec 2007 Posts: 58
|
Posted: Wed Dec 26, 2007 10:57 am |
ahh, thank you!
|
|
|
|
|
|