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

Windows shovel on sand console exe error

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,990
Solutions
9
Reaction score
334
Location
Chile
Hello

Well i don't know if this problem is a big one but im getting errors in console
when i use shovel on sand for example in ankrahmun darashia it digs scarabs or items and its okey
and if i use the shovel on the sand of another city example thais it doesnt dig anything thats its okey for me !!
but im getting this error (when i use shovel on sand of thais for example...)
something strange at least for me that the file that contains functions of every tools doesnt contains info about sand if or digg scarab etc so i dunno how this system works...

im using otx2 that is based on tfs 0.4? latest source


Code:
[7/10/2017 14:52:28] [Error - Action Interface]
[7/10/2017 14:52:28] data/actions/scripts/tools/shovel.lua:onUse
[7/10/2017 14:52:28] Description:
[7/10/2017 14:52:28] (LuaInterface::luaGetThingFromPosition) Tile not found

my shovel.lua
Code:
function onUse(...)
    return TOOLS.SHOVEL(...)
end

all.lua (the file that cotains everything related to tools?)
Code:
local holes = {468, 481, 483, 7932}
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    -- Shovel
    if isInArray(holes, itemEx.itemid) == TRUE then
        doTransformItem(itemEx.uid, itemEx.itemid + 1)
        doDecayItem(itemEx.uid)
        return FALSE
    -- Rope
    elseif toPosition.x == CONTAINER_POSITION or toPosition.x == 0 and toPosition.y == 0 and toPosition.z == 0 then
        return FALSE
    end

    local groundTile = getThingfromPos(toPosition)
    if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
        doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
    elseif isInArray(holeId, itemEx.itemid) == TRUE then
        local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
        if hole.itemid > 0 then
            doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE)
        else
            doPlayerSendCancel(cid, "Sorry, not possible.")
        end
        return FALSE
    -- Pick
    elseif (itemEx.uid <= 65535 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355 or itemEx.itemid == 9024 or itemEx.itemid == 9025) then
        doTransformItem(itemEx.uid, 392)
        doDecayItem(itemEx.uid)
        return TRUE
    elseif itemEx.uid == 60001 then
        doTeleportThing(cid, {x=329, y=772, z=10})
        doSendMagicEffect({x=329, y=772, z=10},10)
        return TRUE
    -- Machete
    elseif itemEx.itemid == 2782 then
        doTransformItem(itemEx.uid, 2781)
        doDecayItem(itemEx.uid)
        return TRUE
    elseif itemEx.itemid == 1499 then
        doRemoveItem(itemEx.uid)
        return TRUE
    -- Scythe
    elseif itemEx.itemid == 2739 then
        doTransformItem(itemEx.uid, 2737)
        doCreateItem(2694, 1, toPosition)
        doDecayItem(itemEx.uid)
        return TRUE
    end
    return destroyItem(cid, itemEx, toPosition)
end
 
Try this I guess;
Lua:
if groundTile and groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
Otherwise update the script and server to the latest OTX codes, if you still have the problem create an issue here insted; Build software better, together
 
Back
Top