I'm trying to make pull a script togther to report the xp I make per day.
Here is my code
%1 is set by the trigger.
You got * xp.
Unfortunatly on the trigger matching, I get...
Any ideas why.. I don't understand why xp is returning nil, when its being set by the trigger.
Here is my code
xp_gained = xp_gained or {} -- make xp_gained table
day = os.date ("%A, %m %B %Y") -- Get todays date.
xp = %1 -- the xp gained (first wildcard)
-- add day entry if first day
xp_gained [day] = xp_gained [day] or { xp = 0 }
-- add xp to the days xp,
xp_gained [day].xp = xp_gained[day].xp + xp
%1 is set by the trigger.
You got * xp.
Unfortunatly on the trigger matching, I get...
Quote:
Run-time error
World: nw
Immediate execution
[string "Trigger: "]:11: attempt to perform arithmetic on field 'xp' (a nil value)
stack traceback:
[string "Trigger: "]:11: in main chunk
Run-time error
World: nw
Immediate execution
[string "Trigger: "]:11: attempt to perform arithmetic on field 'xp' (a nil value)
stack traceback:
[string "Trigger: "]:11: in main chunk
Any ideas why.. I don't understand why xp is returning nil, when its being set by the trigger.