login.lua:
Im trying to when somebody are inside the selected position and login, he ill be teleported to another place, but im getting a error on console:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/login.luanLogin
data/global.lua:412: attempt to index local 'fromPos' (a nil value)
Don't know if im selecting wrong the tiles... Here is how im selecting:
Code:
local combat =
{
-- combat Arena:
{
fromPosition = {x = 104, y = 501, z = 8},
toPosition = {x = 112, y = 508, z = 8},
},
}
function onLogin(cid)
if isInPosition(getCreaturePosition(cid), combat.fromPosition, combat.toPosition) then
doTeleportThing(cid, {x = 112, y = 478, z = 7}, TRUE)
else
return TRUE
end
end
Im trying to when somebody are inside the selected position and login, he ill be teleported to another place, but im getting a error on console:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/login.luanLogin
data/global.lua:412: attempt to index local 'fromPos' (a nil value)
Don't know if im selecting wrong the tiles... Here is how im selecting:
Code:
frompos
\/
......................
|.....................|
|.....................|
|.....................|
|.....................|
|.....................| < topos