• 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!

Lua [8.6] attempt to call global 'getTileThingByPos'

Critico

Sexy
Joined
Mar 25, 2010
Messages
370
Reaction score
176
Can anyone help me with this error:

attempt to call global 'getTileThingByPos'


function:

Lua:
function corpseRetireItems(cid, pos)
    local check = false
    for i = 0, 255 do
        pos.stackpos = i
        tile = getTileThingByPos(pos)
        if tile.uid > 0 and isCorpse(tile.uid) then
            check = true break
        end
    end
    if check == true then
        local items = getContainerItems(tile.uid)
        for i,x in pairs(items) do
            if isInArray(getPlayerStorageTable(cid, info.Storages[1]), tonumber(x.itemid)) or getPlayerStorageValue(cid, info.Storages[2]) > 0 and isInArray({2148,2152,2160},tonumber(x.itemid)) then
                if isItemStackable(x.itemid) then
                    doPlayerAddItemStacking(cid, x.itemid, x.type)
                    if info.AutomaticDeposit == true and isInArray({2148,2152,2160}, tonumber(x.itemid)) then
                        AutomaticDeposit(cid,x.itemid,x.type)
                    end
                else
                    doPlayerAddItem(cid, x.itemid)
                end
                doRemoveItem(x.uid)
            end
        end
    end
end
 
The error message says that there is no such function on your server, check if you have added it to luascripts.cpp
 
Back
Top