Lares
Member
- Joined
- Feb 8, 2010
- Messages
- 315
- Reaction score
- 7
Hello i have small problem because i dont know how i can do it:
check position xyz and if here is tree wall or something then i cant push player on this sqm when i use function (doMoveCreature(cid, direction))
And error
Maybe someone have better idea how i can do it?
check position xyz and if here is tree wall or something then i cant push player on this sqm when i use function (doMoveCreature(cid, direction))
Lua:
function onSay(cid, words, param, channel)
local me = getCreaturePosition(cid)
local x,y,z = me.x,me.y,me.z
local N = {x=x, y=(y-1), z=z, stackpos = 255}
if isCreature(getThingFromPos(N).uid) then
if isWalkable(getThingFromPos(N).uid,N) then
doMoveCreature(getThingFromPos(N).uid, 0)
else
doSendMagicEffect(me, 21)
end
end
return true
end
And error
Code:
[10/08/2010 14:55:12] [Error - TalkAction Interface]
[10/08/2010 14:55:12] data/talkactions/scripts/me.lua:onSay
[10/08/2010 14:55:12] Description:
[10/08/2010 14:55:12] data/talkactions/scripts/me.lua:16: attempt to call global 'isWalkable' (a nil value)
[10/08/2010 14:55:12] stack traceback:
[10/08/2010 14:55:12] data/talkactions/scripts/me.lua:16: in function <data/talkactions/scripts/me.lua:1>
Maybe someone have better idea how i can do it?