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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
graythe
Newbie


Joined: 19 Jan 2007
Posts: 1

PostPosted: Fri Jan 19, 2007 2:36 pm   

Arguments carrying over?
 
I've had a slight problem with a way I used to use to daisy-chain two aliases together - something like this

#alias hl {hamstring @target left;#if (!%null(%1)) {#exec %1}}
#alias sl {slash @target;#if (!%null(%1)) {#exec %1}}
etc.

At the moment, if I use "hl sl" then the second alias seems to retain the arguments from the first alias, thus sending me into an endless loop. Anyone know if there's something I'm doing wrong that could fix this?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Jan 19, 2007 4:24 pm   
 
That shouldn't be creating an infinite loop, surely. One thing you could try is using named arguments:

#alias hl($hlarg) {hamstring @target left;#if (!%null($hlarg)) {#exec $hlarg}}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Jan 19, 2007 8:24 pm   
 
Definitely loops like a bug. Added to the bug list.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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