|
Daarte Beginner
Joined: 09 Jul 2008 Posts: 10
|
Posted: Tue Dec 09, 2008 12:54 pm
# Command |
Hi, I have a bit of a problem if anyone's got a second.
I'm trying to do something like this:
Code: |
#if {@blah > 0} {#@blah do this} |
This doesn't work however, obviously due to the fact that after a #, a command name or a number is expected. As the code shows, I'm trying to use the number within @blah as the needed value for #. Quick fix, anyone?
Thanks in advance. |
|
|
|
Erasmus Wanderer
Joined: 04 Aug 2004 Posts: 82 Location: Philadelphia
|
Posted: Tue Dec 09, 2008 4:46 pm |
~# maybe
|
|
_________________ Erasmus |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Tue Dec 09, 2008 5:14 pm |
With zMUD I'm fairly sure you can get away with #{@blah}
|
|
_________________ Taz :) |
|
|
|
Daarte Beginner
Joined: 09 Jul 2008 Posts: 10
|
Posted: Wed Dec 10, 2008 5:05 am |
Neither way work, but thanks all the same. =]
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Dec 10, 2008 8:47 am |
You're probably looking for the %exec function or #EXEC command.
|
|
_________________ Asati di tempari! |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Wed Dec 10, 2008 12:46 pm |
# on it's own is just a shortened form of #LOOP so
#if (@blah > 0) {#loop @blah {do this}}
will work. Note the change of brackets on the logic part of the #IF you need to use round brackets not curly brackets. |
|
_________________ Taz :) |
|
|
|
Daarte Beginner
Joined: 09 Jul 2008 Posts: 10
|
Posted: Thu Dec 11, 2008 5:13 am |
Ah, great, second option works best for me, but thanks for namedropping %exec, that looks useful too.
|
|
|
|
|
|