Mudlet Crashing

Post Reply
KidGuko
Posts: 11
Joined: Fri Dec 25, 2009 4:31 am

Mudlet Crashing

Post by KidGuko »

I am using Mudlet 1.0.5 on windows XP

I created an alias for the in game command "who here" which lists all players in a current room.

Well, this is the code I used:

Pattern: ^wh?
Substitution: who here

Well, when I go to type wh into the Mud client it crashes the entire Mudlet.

Also, if I type who here into the Mud client it crashes the entire Mudlet.

Now, if I remove the alias and I try typing who here ... it does just fine and does not crash.

So, it has to do with when I create the alias.

Now I have created another alias to tell my name and ask others their name when I type name into the mud client and it works just fine... just when i add this new alias everything crashes.

KidGuko
Posts: 11
Joined: Fri Dec 25, 2009 4:31 am

Re: Mudlet Crashing

Post by KidGuko »

Actually, I think I just figured it out myself...

Since I was telling it to look for wh and then return who here ... well who here when it is typed in starts with wh and puts it into an never ending loop.

Still, I think the substitutions should not be included in any searches... not sure if that would be possible to code in a new version or not?

Anyhow, it was not that big of a deal for an alias. I was just testing things out ;-)


JC

KidGuko
Posts: 11
Joined: Fri Dec 25, 2009 4:31 am

Re: Mudlet Crashing

Post by KidGuko »

Darn it! So sorry guys... you can delete this thread.

I used ^wh? and not ^wh$ ... it works now perfect!

LoL...

Pardon me if you will, I am new to this scripting stuff.

Iocun
Posts: 174
Joined: Wed Dec 02, 2009 1:45 am

Re: Mudlet Crashing

Post by Iocun »

Also, to be on the safe side with aliases, I'd use send("who here") instead of a substitution. That way, it won't be reevaluated as an alias and you don't get any infinite loops.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet Crashing

Post by Vadi »

While it is a bug that substitition was being re-evaluated as an alias before sending, we can't do much to prevent you from causing loops otherwise (like if you use expandAlias) unfortunately :| .

KidGuko
Posts: 11
Joined: Fri Dec 25, 2009 4:31 am

Re: Mudlet Crashing

Post by KidGuko »

Yeah, that loop was my fault to be honest...

But, still better it crashes on an infinite loop than freezing and causing a memory leak which could be worse.

Post Reply