TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

DEBUG_STACK & #alias

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
esrevni



Joined: 05 Sep 2006
Posts: 2

PostPosted: Tue Sep 05, 2006 10:56 am    Post subject: DEBUG_STACK & #alias Reply with quote

hi!

so this is an example of the problem I'm having:

#alias {eat} {take rat bag;eat rat}

when typing eat produces:

DEBUG_STACK[000] = main(0x1,0xbfa1da44)
DEBUG_STACK[001] = [toril] parse_input(eat,0x80d82c0)
DEBUG_STACK[002] = [toril] parse_input(take rat bag;eat rat,0x80d82c0)
DEBUG_STACK[003] = [toril] parse_input(take rat bag;eat rat rat,0x80d82c0)
DEBUG_STACK[004] = [toril] parse_input(take rat bag;eat rat rat rat,0x80d82c0)
DEBUG_STACK[005] = [toril] parse_input(take rat bag;eat rat rat rat rat,0x80d82c0)

etc etc until DEBUG_STACK[039]

Oddly enough, this only seems to happen with mulit-word commands.
example: #alias {st} {wake;stand} works fine.

I've also tried making the 'take rat bag' and 'eat rat' into variables and substitution those into #alias. It produced the same error. I've also attempted #alias {eat} {#1 take rat bag;eat rat}, same results.

Any ideas?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3844

PostPosted: Tue Sep 05, 2006 12:20 pm    Post subject: Reply with quote

You're creating an infinite loop because you use 'eat' within the alias which once again executes the alias.

You can avoid this by using:

#alias {eat} {take rat bag;\eat rat}

or

#alias {eat} {take rat bag;Eat rat}

or

#alias {eat} {take rat bag\neat rat}
Back to top
View user's profile Send private message Send e-mail
esrevni



Joined: 05 Sep 2006
Posts: 2

PostPosted: Tue Sep 05, 2006 1:24 pm    Post subject: Reply with quote

ahhh that makes perfect sense, that never even occured to me.

Thanks a ton, this has been boggling me.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group