Aleada
Unknown Member
- Joined
- Mar 14, 2013
- Messages
- 231
- Reaction score
- 7
Heya everyone, I was just wondering... how do you get a target's position (Monsters & Players) in "[9.80-9.86] The Forgotten Server v0.2.15 (Mystic Spirit)"?
I've tried litterally everything but all I get is this error:
These are some things I've tried....
None of them are working though :/
I've tried litterally everything but all I get is this error:
Code:
[25/07/2013 21:51:56] Lua Script Error: [Spell Interface]
[25/07/2013 21:51:56] in a timer event called from:
[25/07/2013 21:51:56] data/spells/scripts/custom/stun.lua:onCastSpell
[25/07/2013 21:51:56] attempt to index a nil value
[25/07/2013 21:51:56] stack traceback:
[25/07/2013 21:51:57] [C]: at 0x07f7b03ad3e0
[25/07/2013 21:51:57] [C]: in function 'doSendMagicEffect'
[25/07/2013 21:51:57] data/spells/scripts/custom/stun.lua:13: in function <data/spells/scripts/custom/stun.lua:12>
These are some things I've tried....
LUA:
function effect(cid, var, targetpos, mypos, target)
doSendMagicEffect(mypos, CONST_ME_ENERGYHIT)
doSendMagicEffect(targetpos, CONST_ME_ENERGYHIT)
end
LUA:
doSendMagicEffect(getCreaturePosition(target), CONST_ME_SLEEP)
LUA:
local function effect(cid)
local targ = getCreatureTarget(cid)
doSendMagicEffect(getThingPos(targ), CONST_ME_SLEEP)
end
LUA:
local function Effect(cid, target)
local effect = getCreaturePosition(target)
doSendMagicEffect(effect, CONST_ME_SLEEP)
end
None of them are working though :/