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
FriedDuck
Newbie


Joined: 29 Sep 2002
Posts: 4

PostPosted: Sat Oct 05, 2002 4:18 am   

Infinite loops warning
 
Hi, I am new to Zmud and have been copying over my existing aliases and triggers into zmud as a starting point for having the same basic functionality as i used to have in my previous client, and then i was going to start building up and modifying stuff based on the superior abilities of zmud.

On several of my groupings of aliases, I am getting an error regarding infinite loops. However, I literally cut and pasted every alias over from my old client, and i KNOW they do work, and I have looked and can find no circular reference ( i have a CS degree and program for a living, so i understand what an infinite loop is ).

Since it thinks there is an inifinite loop, it stops execution in awkward places. I wanted to see if i could get any information on what usually causes this message, or if anyone has had any prior experiences with this kind of behavior.

Thanks,
Duck
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Oct 05, 2002 7:43 am   
 
quote:

Hi, I am new to Zmud and have been copying over my existing aliases and triggers into zmud as a starting point for having the same basic functionality as i used to have in my previous client, and then i was going to start building up and modifying stuff based on the superior abilities of zmud.

On several of my groupings of aliases, I am getting an error regarding infinite loops. However, I literally cut and pasted every alias over from my old client, and i KNOW they do work, and I have looked and can find no circular reference ( i have a CS degree and program for a living, so i understand what an infinite loop is ).

Since it thinks there is an inifinite loop, it stops execution in awkward places. I wanted to see if i could get any information on what usually causes this message, or if anyone has had any prior experiences with this kind of behavior.

Thanks,
Duck




Limited only to aliases, I can only think of two instances:

1)you have either 1 alias calling itself (which I'm not sure is possible), or you have 2 or more aliases calling each other in a chain:

#alias Buy1 {Buy2}
#alias Buy2 {Buy3}
#alias Buy3 {Buy1}

2)you named an alias after a MUD command and at some point are meaning to send the MUD command to the mud:

#alias Quit {#case %ismember(%lower(%1),"game|smoking") {quit} {unready cigarette}}

The correct way to issue a MUD command for which an alias is also named is to precede it with the tilde (~), which is the default quote character in zmud:

#alias Quit {#case %ismember(%lower(%1),"game|smoking") {~quit} {unready cigarette}}


li'l shmoe of Dragon's Gate MUD
Reply with quote
FriedDuck
Newbie


Joined: 29 Sep 2002
Posts: 4

PostPosted: Sun Oct 06, 2002 4:19 pm   
 
Okay, what i tried was to combine all the small aliases into one large alias. This removed the infinite loop warning. And it now runs perfectly, which meant there was never an infinite loop to begin with, zMud was just confused.

What I had was a series of aliases that called their "successor" after they were done with their sequence. This was done because my previous client limited the text to which I could have in an alias. Since zMud can hold MUCH more within a single alias, it is better to have them combined anyways.

The pattern was essentially:

alias1 = some commands , alias2
alias2 = some commands , alias3
alias3 = some commands , alias4
alias4 = some commands . alias5
...
alias7 = some commands

Note that each of the sets DID end, and none of them actually contained an infinite loop. So I don't know why zMud confused it for an infinite loop, but perhaps the internal algorithm that it uses to detect an infinite loop condition is not correct.

Duck
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