|
ron2777 Newbie
Joined: 06 Mar 2002 Posts: 2 Location: USA
|
Posted: Wed Mar 06, 2002 5:54 am
zmud 4.62 variable |
i still use 4.62 cause i learn with it, too lazy to mess with the new ones
but have a little question about the variable
#4 drink water, is you drink 5 times
but what if you store the 4 in a var like count
#var count 4
i know to get the 4 out, you need use @count
then how do you make it able to do
#4 drink water by using the @count, or is there a way.
anyone can help pls tell me, thanks!
Ron |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Wed Mar 06, 2002 8:41 am |
I don't have 4.62, but have you tried using [] or <> to expand the variables?
#[@count] {drink water}
#<@count> {drink water}
Iljhar |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Mar 06, 2002 1:33 pm |
Also, check to see if 4.62 has a #REPEAT command, because this would help in this case.
Kjata |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Mar 06, 2002 3:00 pm |
Try the obvious first:
#@count drink water
If that doesn't work, try expanding the variable as per Iljhar's response. Next, check out YOUR helpfiles to see what commands you have that are designed for repeating things, such as #REPEAT or #LOOP as per Kjata's response.
If all the easy ways fail, write a script to do it.
#ALIAS repeat {#IF (@count > 0) {#ADD count -1;%-1;repeat %-1}}
There, a nice freeze-the-computer type alias
LightBulb
All scripts untested unless otherwise noted |
|
|
|
ron2777 Newbie
Joined: 06 Mar 2002 Posts: 2 Location: USA
|
Posted: Wed Mar 06, 2002 10:18 pm |
Thanks for everyones help
i solve the problem by
#loo @count drink water
using loop to repeat it
Thanks!
Ron |
|
|
|
|
|