• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Erro in spell (luaGetThingFromPos) Tile not found

Drs1705

Member
Joined
Dec 26, 2011
Messages
69
Reaction score
14
I get this error when using a spell

Code:
[12/05/2013 21:18:20] [Error - Spell Interface] 
[12/05/2013 21:18:20] In a timer event called from: 
[12/05/2013 21:18:20] data/spells/scripts/ar/soprar.lua:onCastSpell
[12/05/2013 21:18:20] Description: 
[12/05/2013 21:18:20] (luaGetThingFromPos) Tile not found

He can not find the tile that role when player is in a high place
Code:
local function UM(cid)
pos = getPosfromArea (cid, arr1)
n = 0

while n <# of pos
n = n +1
thing = {pos = x [n]. x, y = pos [n]. y, z = pos [n]. z = 253} stackpos
*** if isPlayer (getThingfromPos (thing). uid) == TRUE then
*** doPushCreature (getThingfromPos (thing). uid, getPlayerLookDir (cid))
*** elseif isMonster (getThingfromPos (thing). uid) == TRUE then
**** doPushCreature (getThingfromPos (thing). uid, getPlayerLookDir (cid))
**** end
end

How do I include "getTileInfo" function to check if you have tile?
 
Last edited:
LUA:
local function UM(cid)
    pos = arr1
    n = 0
    repeat
        n = n+1
        thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253}
        creature = getTopCreature(thing)
        if(isPlayer(creature)) then
            doPushCreature(creature,getCreatureLookDirection)cid))
        elseif(isMonster(creature)) then
            doPushCreature(creature,getCreatureLookDirection(cid))
        end
    until n == table.maxn(pos)-1
end

*EDIT-1*: You never stated "arr1" in your script. Also, you had ALOT of useless spaces/etc.., the script looked quite ugly to my eyes. I took the liberty of fixing it for you. You have to state "arr1" in the functions constants.

*EDIT-2*: --- ignore this ---

*EDIT-3*: Fixed it up a bit.

*EDIT-4*: And what is
LUA:
getPosFromArea()
? I've never heard of such a function...

*EDIT-5* Give it a try now.
 
Last edited:
this solution did not work, and disabled the function getPosFromArea keeps giving error thing

EDIT

is no function getPosFromArea will not work, just want to stop with the error thing, no need to fix.
 
Last edited:
Back
Top