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

What wrong with this script?

tatu hunter

Insane Mind~
Joined
Jun 6, 2007
Messages
354
Reaction score
23
Location
Itaporã, Brazil
When I try to remove the wall I got this error:
[01/02/2008 03:00:06] Lua Script Error: [Action Interface]
[01/02/2008 03:00:06] data/actions/scripts/wall1.lua:eek:nUse
[01/02/2008 03:00:06] luaDoRemoveItem(). Item not found

my code:
Code:
function onUse(cid, item, frompos, item2, topos)
    local wall1 = {x = 1496, y = 1488, z = 5}
    local wall2 = {x = 1497, y = 1488, z = 5}
    
    if(item.uid == 3333) then
        if(item.itemid == 1945) then
            doRemoveItem(wall1.uid, 1)
            doRemoveItem(wall2.uid, 1)
            doTransformItem(item.uid, 1946)
        elseif(item.itemid == 1946) then
            doCreateItem(1052, 1, wall1)
            doCreateItem(1052, 1, wall2)
            doTransformItem(item.uid, 1945)        
        else
            doPlayerSendCancel(cid,"Sorry, not possible.")
        end
    end
    return 1
end
 
Change the first part to this:
local wall1 = getThingfromPos({x = 1496, y = 1488, z = 5})
local wall2 = getThingfromPos({x = 1497, y = 1488, z = 5})
Not sure if you need a stackpos.
 
Back
Top