I get a bug with this code
I want a function to check a player from some positions but I get:
luaGetThingfromPos(). ( 00000 / 00000 / 000 ) Tile not found
I got TFS 0.2.2
Why this bug? And how can I fix this? rep+
I want a function to check a player from some positions but I get:
luaGetThingfromPos(). ( 00000 / 00000 / 000 ) Tile not found
I got TFS 0.2.2
Why this bug? And how can I fix this? rep+
Lua:
function onCastSpell(cid, var)
local ppos = getPlayerPosition(cid)
local positions = {
{x = (ppos.x - 6), y=ppos.y, z=ppos.z, stackpos=253},
{x = (ppos.x - 5), y=ppos.y, z=ppos.z, stackpos=253},
{x = (ppos.x - 4), y=ppos.y, z=ppos.z, stackpos=253},
{x = (ppos.x - 3), y=ppos.y, z=ppos.z, stackpos=253},
{x = (ppos.x - 2), y=ppos.y, z=ppos.z, stackpos=253},
{x = (ppos.x - 1), y=ppos.y, z=ppos.z, stackpos=253},
}
local magnet = getThingfromPos(positions)
if isPlayer(magnet.uid) == TRUE then
...etc