[help] Mudlet is crashing

Post Reply
icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

[help] Mudlet is crashing

Post by icesteruk »

Soo I made an alias like

^hut ?(\w*) ?(\w*) ?(\w*) ?(\w*) ?(\w*)$

with .....
Code: [show] | [select all] lua
mayhem.hunt = {}

if matches[2] then
mayhem.hunt.one = matches[2]
end
if matches[3] ~= "" then
mayhem.hunt.two = matches[3]
end

if matches[4] ~= ""  then
mayhem.hunt.three = matches[4]
end
if matches[5] ~= ""  then
mayhem.hunt.four = matches[5]
end
if matches[6] ~= ""  then
mayhem.hunt.five = matches[6]
end
Which works perfect but IF i change it to

^hunt ?(\w*) ?(\w*) ?(\w*) ?(\w*) ?(\w*)$

it crashes mudlet ... Any one happen to know why... this happened on a friends mudlet so I thought to check it on my own and it happens on mine also!

so hunt batman robin joker .... crashes but hut batman robin joker.. doesnt..

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: [help] Mudlet is crashing

Post by chris »

I imagine you are calling 'hunt <mob>' somewhere else, causing an infinite loop.

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: [help] Mudlet is crashing

Post by icesteruk »

nope I checked, the guy who had the first issue wasnt even on my system, I only called hunt that one time :/

I call ^hunting$ ..

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: [help] Mudlet is crashing

Post by Belgarath »

it matches both as you have the ? after 'hut ' which means there can be a space or there can't. Thus when you type in 'hunting' it will fire that one as well... I'd suggest changing that.

Post Reply