hyz
Member
- Joined
- Oct 30, 2008
- Messages
- 39
- Reaction score
- 19
I need help because I put the action on my server and did not work following error message.
and here is the script
My server is TFS 8.42
Code:
[14/10/2009 10:49:17] data/actions/scripts/wallremoving.lua:13: attempt to call global 'getThingFromPos' (a nil value)
[14/10/2009 10:49:17] stack traceback:
[14/10/2009 10:49:17] data/actions/scripts/wallremoving.lua:13: in function <data/actions/scripts/wallremoving.lua:4>
and here is the script
Code:
local wallPos = {x=205, y=55, z=7, stackpos=1} -- Position of the wall
doCreateItem(3432, 1, wallPos) -- Replace 1112 to the ID of your wall
function onUse(cid, item, frompos, item2, topos)
local config = {
removeMessage = "You removed a wall!", -- Message when you remove the wall
createMessage = "You created a wall!", -- Message when you create the wall
wallPos = {x=205, y=55, z=7, stackpos=1}, -- Position of the wall
switchUID = 1337, -- Unique ID of the switch
timer = 1*60*1000 -- After how long time the wall should be created again after using the switch
}
local getWall = getThingFromPos(config.wallPos)
if item.uid == switchUID then
doRemoveItem(getWall.uid, 1)
doPlayerSendTextMessage(cid, 19, config.removeMessage)
doTransformItem(item.uid, item.itemid+1)
addEvent(createWall, config.timer)
end
end
My server is TFS 8.42