|
Serentus Apprentice
Joined: 28 Sep 2001 Posts: 103 Location: USA
|
Posted: Tue Mar 02, 2004 7:42 am
Aliases and Parameters |
I have attack alias that are set up like this
#ALIAS {att} {#IF (%numparam()>0) {attack %1} {attack @Target}}
Works great, but doesn't work if the alias is like this. It seem to always think there is a parameter.
#ALIAS {test} {#IF (@vari=1) {#SAY vari is 1};#IF (%numparam()>0) {#SAY Param is %1} {#SAY No Param}}
When vari = 1
'test' outputs
vari is 1
Param is
'test this' outputs
vari is 1
Param is this
When vari = 0 it works as expected.
Why? What am i doing wrong here? |
|
|
|
Pega Magician
Joined: 08 Jan 2001 Posts: 341 Location: Singapore
|
Posted: Tue Mar 02, 2004 10:30 am |
Perhaps you should say what you expect out of it, because the above works as expected.
|
|
|
|
Serentus Apprentice
Joined: 28 Sep 2001 Posts: 103 Location: USA
|
Posted: Wed Mar 03, 2004 5:53 am |
What would I expect out of it?
I would expect for #IF (%numparam>0) to be true when a thre is a parameter and false when there isn't. Like i said....
quote: It seem to always think there is a parameter.
now if @vari=0 then it does act like that i would expect
'test' say 'No Param'
'test this' says 'Param is this'
if @Vari=1 then
'test' says 'Param is '
'test this' says 'Param is this'
I would have thought that would be clear when i gave the output and I said that
quote: 'test' outputs
vari is 1
Param is
that would show that it thinks there is a parameter. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Wed Mar 03, 2004 5:02 pm |
I just tested from your exact trigger and it works
test
vari is 1
no param
test this
vari is 1
param is this |
|
|
|
Serentus Apprentice
Joined: 28 Sep 2001 Posts: 103 Location: USA
|
Posted: Thu Mar 04, 2004 12:18 am |
I promise it didn't work before, but it seems to work now. It drove me crazy not working. I'm not nuts now. I promise. No definatly not nuts. These padded rooms mean nothing. [:p]
|
|
|
|
|
|