MagicHereos
Magic.org.pl
- Joined
- Nov 6, 2008
- Messages
- 60
- Reaction score
- 0
Hello !
I wrote my first script and it... dont work
movements - hp.lua :
And movements :
[01/01/2004 20:48:41] data/movements/scripts/hp.lua:2: attempt to call global 'getPlayerHealth' (a nil value)
[01/01/2004 20:48:41] stack traceback:
[01/01/2004 20:48:41] data/movements/scripts/hp.lua:2: in function <data/movements/scripts/hp.lua:1>
[/code]
:blink::blink:
What I should to give to place of getPlayerHealth?( : Or meaby I have any mistake (error) in it?
Sorry for my English, but i learn it now
Thanks,
Magic
I wrote my first script and it... dont work
movements - hp.lua :
Code:
function onStepIn(cid, item, pos)
local hp = getPlayerHealth(uid)
if(pos.x == 814) and (pos.y == 1112) and (pos.z == 7)
then
doPlayerSendTextMessage(cid, 19, "Czujesz ukojenie") and doPlayerAddHealth(uid,hp)
doSendAnimatedText(x=814 y=1112 z=7,Przekraczajac bramy rookguardu, czujesz ukojenie...,8)
end
retun 1
end
Code:
<movevent event="StepIn" uniqueid="9213" script="hp.lua" />
And I have this error :
[01/01/2004 20:48:41] data/movements/scripts/hp.lua:2: attempt to call global 'getPlayerHealth' (a nil value)
[01/01/2004 20:48:41] stack traceback:
[01/01/2004 20:48:41] data/movements/scripts/hp.lua:2: in function <data/movements/scripts/hp.lua:1>
[/code]
:blink::blink:
What I should to give to place of getPlayerHealth?( : Or meaby I have any mistake (error) in it?
Sorry for my English, but i learn it now
Thanks,
Magic