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

Lua PoI Console Error

Ceejzor

Murica Born N Raised!
Joined
Jul 5, 2008
Messages
2,293
Reaction score
188
Location
USA - Philippines
I have been getting this error in my console.
PHP:
[29/03/2010 11:40:13] [Error - MoveEvents Interface] 
[29/03/2010 11:40:13] data/movements/scripts/PitsOfInferno/MagicWallEntrance.lua:onStepIn
[29/03/2010 11:40:14] Description: 
[29/03/2010 11:40:14] ...ovements/scripts/PitsOfInferno/MagicWallEntrance.lua:5: attempt to compare boolean with number
[29/03/2010 11:40:14] stack traceback:
[29/03/2010 11:40:14] 	...ovements/scripts/PitsOfInferno/MagicWallEntrance.lua:5: in function <...ovements/scripts/PitsOfInferno/MagicWallEntrance.lua:1>

Is there something wrong with this?

MagicWallEntrance.lua
PHP:
function onStepIn(cid, item, pos)
	local position = {x=412, y=1414, z=9}
	local position2 = {x=398, y=1380, z=9}
	
		if (getPlayerItemCount(cid, 1970) < 1) then
			doTeleportThing(cid, position)
			doSendMagicEffect(position,10)
		else

			doTeleportThing(cid, position2)
						doSendMagicEffect(position2,10)
		end
end

Anyway thanks in advance~
 
this might work, not sure ;S
Code:
function onStepIn(cid, item, position, fromPosition)
local position2 = {x=398, y=1380, z=9} 
	if isPlayer(cid) and getPlayerItemCount(cid, 1970) >= 1 then
		return doTeleportThing(cid, position2) or doTeleportThing(cid, fromPosition) and doSendMagicEffect(getThingPos(cid), 10)
	end
	return true
end

if not try this:
Code:
function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) then
		if getPlayerItemCount(cid, 1970) >= 1 then
			doTeleportThing(cid, {x = 398, y = 1380, z = 9})
		else
		 	doTeleportThing(cid, fromPosition)
		end
	end
	return doSendMagicEffect(getThingPos(cid), 10)
end
 
Code:
function onStepIn(cid, item, position, fromPosition)
	if not isPlayer(cid) then return end
	local v = getPlayerItemCount(cid, 1970) > 0 and {x=412, y=1414, z=9} or {x=398, y=1380, z=9}
	doTeleportThing(cid, v)
	doSendMagicEffect(v, CONST_ME_TELEPORT)
end
:/ ^_^ :p
 
Back
Top