Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: 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?
Reply with quote
Pega
Magician


Joined: 08 Jan 2001
Posts: 341
Location: Singapore

PostPosted: Tue Mar 02, 2004 10:30 am   
 
Perhaps you should say what you expect out of it, because the above works as expected. Wink
Reply with quote
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: 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.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: 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
Reply with quote
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: 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]
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net