I did everything ok and i get error :blink:
Script:
in actions.xml:
After i finish the 7 quests i go to the doorwhen i try to open it i get error on the restarter:
Please help =///
Script:
Code:
function onUse(cid, item, frompos, item2, topos)
local queststatus = getPlayerStorageValue(cid,1234561)
local queststatus2 = getPlayerStorageValue(cid,1234562)
local queststatus3 = getPlayerStorageValue(cid,1234563)
local queststatus4 = getPlayerStorageValue(cid,1234564)
local queststatus5 = getPlayerStorageValue(cid,1234565)
local queststatus6 = getPlayerStorageValue(cid,1234566)
local queststatus7 = getPlayerStorageValue(cid,1234567)
if item.uid == 6321 then
if queststatus == -1 or queststatus2 == -1 or queststatus3 == -1 or queststatus4 == -1 or queststatus5 == -1 or queststatus6 == -1 or queststatus7 == -1 then
doPlayerSendTextMessage(cid,22,"You dont have enough spirit.")
else
local pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,"Stand in front of the door.")
end
doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
end
return 1
end
end
in actions.xml:
Code:
<action uniqueid="6321" script="poi/questdoor.lua" />
After i finish the 7 quests i go to the doorwhen i try to open it i get error on the restarter:
Code:
Lua Error: [Action Interface]
data/actions/scripts/poi/questdoor.lua:OnUse
attempt to index a number value
Please help =///