Hi Nick and all,
As a newbie to mushclient, I am trying to follow Nick's reply in this post to build up my own tracker for a MUD I'm playing:
https://mushclient.com/forum/?id=8843&reply=4#reply4
Here is my code:
%2 is set by the trigger as below(sorry the description is in Traditional Chinese since I'm playing a MUD built up and run in Taiwan):
^吒]為你殺死了(.*),得到了\s+(\d+)點經驗值和\s+(\d+)點潛能以及\s+(\d+)點聲望。$
The trigger is successfully triggered, while I encountered this error message and could not resolve it after trail and errors for several days:
Run-time error
World: 再戰江湖
Immediate execution
[string "Trigger: "]:3: attempt to index global 'xp_gained' (a nil value)
stack traceback:
[string "Trigger: "]:3: in main chunk
Could Nick or anyone shed some light on this? Ideally, I want to track 3 stats (XP, POT, and SC) after killing mobs in the given period (hours or days) and show in a table.
Thanks for help in advance.
As a newbie to mushclient, I am trying to follow Nick's reply in this post to build up my own tracker for a MUD I'm playing:
https://mushclient.com/forum/?id=8843&reply=4#reply4
Here is my code:
date = os.date ("%d-%m-%Y") -- eg. 06-08-2008
xp_gained [date] = (xp_gained [date] or 0) + xp
xp = %2 -- the xp gained%2 is set by the trigger as below(sorry the description is in Traditional Chinese since I'm playing a MUD built up and run in Taiwan):
^吒]為你殺死了(.*),得到了\s+(\d+)點經驗值和\s+(\d+)點潛能以及\s+(\d+)點聲望。$
The trigger is successfully triggered, while I encountered this error message and could not resolve it after trail and errors for several days:
Run-time error
World: 再戰江湖
Immediate execution
[string "Trigger: "]:3: attempt to index global 'xp_gained' (a nil value)
stack traceback:
[string "Trigger: "]:3: in main chunk
Could Nick or anyone shed some light on this? Ideally, I want to track 3 stats (XP, POT, and SC) after killing mobs in the given period (hours or days) and show in a table.
Thanks for help in advance.