deleteline() Problem

Post Reply
alcander
Posts: 2
Joined: Sun Nov 22, 2009 2:07 am

deleteline() Problem

Post by alcander »

Trying to use Mudlet with the latest Mac OSX version. I've gone through the manual and now I have begun to work through some of the items that I've used with Zmud in the past. Basic Triggers seem to be working fine, I'll admit that I'm a little spoiled with never having to fully learn regex, but now is probably as good a time as any to do so.

Here's my pattern:

^Hp\: (\d+)\((\d+)\) Gp\: (\d+)\((\d+)\) Xp\: (\d+)\((\d+)\)

I know this works because I'm able to use all the variables; however, if I try to "gag" the line using deleteline() I get an error in the debugging process.

Code: Select all

Trigger name=Health Management(^Hp\: (\d+)\((\d+)\) Gp\: (\d+)\((\d+)\) Xp\: (\d+)\((\d+)\)  ) 
matched.
capture group #0 = <Hp: 9575(9575) Gp: 1855(1855) Xp: 129500(123000000)  >
capture group #1 = <9575>
capture group #2 = <9575>
capture group #3 = <1855>
capture group #4 = <1855>
capture group #5 = <129500>
capture group #6 = <123000000>
LUA: ERROR running script Health Management (Trigger6) ERROR:Lua error:[string "function Trigger6().
.."]:2: attempt to call global 'deleteline' (a nil value)new line arrived:Hp: 9575(9575) Gp: 
1855(1855) Xp: 129500(123000000)   
Is there something that I am missing here?

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

Re: deleteline() Problem

Post by Vadi »

Lua is case-sensitive.

We should imply that strongly in the manual at the beginning :)

alcander
Posts: 2
Joined: Sun Nov 22, 2009 2:07 am

Re: deleteline() Problem

Post by alcander »

DOH!!

Post Reply