Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-20-17, 02:33 PM   #19
Kakjens
A Cliff Giant
Join Date: Apr 2017
Posts: 75
You might want to set a variable to your character name via UnitName("player") during login and checking it during event.
About string:match I am suspicious that it will record the item even if you didn't obtain it but simply rolled during greed/need/pass. So additional check might be needed.
You have slightly wrong idea about LootLog = {} . It prepares LootLog for the first recording. Actual saving is due to LootLog being in toc file.
Local function is supposedly faster, and has limited scope where it can be accessed/modified. In posts 1 and 6 you were already using them: keyword local before function.
In my scripts for event handling I usually use ellipsis(...) as the last argument, and assign it to local variable but how did you write should also work.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Logging the item my character acquired


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off