Soandso2
Well-known member
I thought I understood events, but apparently I do not. What am I missing?
Upon the first drop I looted, the function updateLoot starts spamming and never stops.
This is the Lua in full (used as a required script in my main Lua script)
loot.lua
Upon the first drop I looted, the function updateLoot starts spamming and never stops.
This is the Lua in full (used as a required script in my main Lua script)
loot.lua
Lua:
local loot = {}
local function lootlist()
print("\awLooted items")
for key,value in pairs(loot) do
print("\ayNumber of \ag"..key.."\ay = "..value)
end
end
local function updateLoot(line,item)
print(line)
if loot[item] == nil then
loot[item] = 1
else
loot[item] = loot[item]+1
end
end
mq.bind('/ll', lootlist)
mq.event("Update","--You have looted #1# from #*#",updateLoot)

