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

[Help] I got problem with quest door script.

Galgula

New Member
Joined
Nov 15, 2007
Messages
28
Reaction score
0
I did everything ok and i get error :blink:

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 =///
 
Back
Top