• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Error distro

TopllDanStar

New Member
Joined
Aug 4, 2014
Messages
11
Reaction score
0
I have a autoloot system for action, it is working only normal that has monsters that when I loot ai gives this error;
[08/10/201410:15:08][Error-ActionInterface][08/10/201410:15:08] data/actions/scripts/Autoloot.lua:eek:nUse
[08/10/201410:15:08]Description:[08/10/201410:15:08](luaGetContainerSize)Containernot found

[08/10/201410:15:08][Error-ActionInterface][08/10/201410:15:08] data/actions/scripts/Autoloot.lua:eek:nUse[08/10/201410:15:08]Description:[08/10/201410:15:08] data/actions/scripts/Autoloot.lua:8: attempt to perform arithmetic on a boolean value[08/10/201410:15:08] stack traceback:[08/10/201410:15:08] data/actions/scripts/Autoloot.lua:8:infunction<data/actions/scripts/Autoloot.lua:2>

script
--local toloot = {11441, 11441, 11443, 11444, 11445, 11446, 11447, 11448, 11449,11450, 11451, 11452, 11453, 11454, 12618, 12232, 12244}
function onUse(cid, item, frompos, item2, topos)
if getItemAttribute(item.uid, "corpseowner") ~= cid then
doPlayerSendCancel(cid, "You're not the owner.")
return true
end
local items = {}
for x=0, getContainerSize(item.uid) -1 do
local itens = getContainerItem(item.uid, x)
--if isInArray(toloot, itens.itemid) then
table.insert(items, {i=itens.itemid, q=itens.type})
doRemoveItem(itens.uid)
--break
--end
end
for y=1, #items do
doPlayerAddItemStacking(cid, items[y].i, items[y].q)
doPlayerSendTextMessage(cid, 20, "Looted "..items[y].q.."x "..getItemNameById(items[y].i)..".")
end
if #items > 0 then
return true
else
return false
end
end
 
Last edited:
Can you post the script how it looked like originally in code tags?
Lines and words are merged, so it's hard to see how the script used to look like. There is an error on line 8, but the script you posted has less than 8 lines.
 
Back
Top