|
Stephen Newbie
Joined: 02 Nov 2000 Posts: 8
|
Posted: Fri Feb 22, 2002 1:41 am
A problem with aliases ( quite simple, probably ) |
Here is my alias:
#if (%1="") {emot howls angrily and spits on the ground~.} {pmot spits yellow saliva at %1~.}
Yet, if I type:
spit
It still does the second emote, but with no target.
If I use a target name, it works perfect.. Calling the second emote.
Thank you. |
|
|
|
Stephen Newbie
Joined: 02 Nov 2000 Posts: 8
|
Posted: Fri Feb 22, 2002 1:50 am |
Sorry, I forgot to add:
Windows ME - P2 400, 64MB
Zmud 6.16 - Registered |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Feb 22, 2002 1:55 am |
Try using:
Syntax: %numparam()
returns the number of parameters passed to
an alias.
#if (%numparam() == 0) {emot howls angrily and spits on the ground~.} {pmot spits yellow saliva at %1~.}
TonDiening
Beta Upgrading to 6.26 |
|
|
|
EdwinDroom Wanderer
Joined: 25 Jan 2002 Posts: 77 Location: Ireland
|
Posted: Fri Feb 22, 2002 2:07 am |
confused...
well, first i presume you have a trigger on spit as a command.
If so, have tried this out and it seems to be working (in 6.26) as you want it to.
All i can suggest is uaing something like spit ground, and basing the #IF on that, as it seems not to be recognising the empty string. Or 2 separate aliases, spt and spit (say)
All the best freaks are here, please stop staring at me |
|
|
|
Stephen Newbie
Joined: 02 Nov 2000 Posts: 8
|
Posted: Fri Feb 22, 2002 2:10 am |
Thank you for your prompt responses.
The best solution I have found is to change:
#if (%1="")
to
#if (%1=%null)
It now works perfectly. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Feb 22, 2002 11:30 pm |
quote:
Thank you for your prompt responses.
The best solution I have found is to change:
#if (%1="")
to
#if (%1=%null)
It now works perfectly.
I had a #yesno with 3 buttons, each of which assigned the appropriate value to the @script.mode variable. Using #IF (%1 = %null) actually worked, but it worked incorrectly. The first button (mode 0)pressed would set the mode correctly, but the other two would not make the assignment and the mode would get stuck on the last chosen mode. #IF (%null(%1)) totally fixed such problems.
li'l shmoe of Dragon's Gate MUD |
|
|
|
|
|