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
Jah
Wanderer


Joined: 11 Oct 2000
Posts: 52
Location: Sweden

PostPosted: Tue Jul 29, 2003 1:18 am   

Erm, crash boom bang..
 
alias : bash

#if (%1 = %null) {bash @target} {
bash %1
var target %1
}

That crash zmud for me. Strangeness.
Reply with quote
Jah
Wanderer


Joined: 11 Oct 2000
Posts: 52
Location: Sweden

PostPosted: Tue Jul 29, 2003 1:21 am   
 
Duh, sometimes im to stupid.. forgot about ~

Should still mention infinite loop i think... hmm..
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jul 29, 2003 2:54 am   
 
What's strange about it. You named your alias "bash", then had both sides of the #IF use "bash", which means it loops back to the alias and checks #IF again, get another "bash", loops back to the alias again...Worse than that, since you put the #VAR command after the "bash", unless @target is empty you'll be stacking up another #VAR command every time through, all waiting for the infinite "bash"ing to finish...

The ~ is essential if you intend to use the name of an existing command as your alias name, while simultaneously using that command within the alias. I'm assuming you have "var" instead of "#var" because of a typo.

alias : bash

#if (%1 = %null) {~bash @target} {
~bash %1
#var target %1
}
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