Arn
Member
- Joined
- Mar 8, 2010
- Messages
- 282
- Reaction score
- 18
Hello and thank you for reading,
I'm trying to figure out how to set the starting health and mana for new players, and no matter what I try, it won't work. I tried this:
firstitems.lua
The only thing that happens, is the player isn't allowed to log in, and my server generates an error.
There has to be a simpler, easier way to do this. Maybe, I'm missing a tag in vocations.xml or something.
Please help, thank you!
-Arn
I'm trying to figure out how to set the starting health and mana for new players, and no matter what I try, it won't work. I tried this:
firstitems.lua
Code:
if getPlayerStorageValue(cid, 30001) == -1 then
setCreatureMaxMana(cid, 100)
The only thing that happens, is the player isn't allowed to log in, and my server generates an error.
Code:
data/creaturescripts/scripts/firstitems.lua:onLogin
[18/06/2012 18:00:55] data/creaturescripts/scripts/firstitems.lua:10: attempt to call global 'setCreatureMaxMana' (a nil value)
[18/06/2012 18:00:55] stack traceback:
[18/06/2012 18:00:55] [C]: in function 'setCreatureMaxMana'
[18/06/2012 18:00:55] data/creaturescripts/scripts/firstitems.lua:10: in function <data/creaturescripts/scripts/firstitems.lua:7>
There has to be a simpler, easier way to do this. Maybe, I'm missing a tag in vocations.xml or something.
Please help, thank you!
-Arn
Last edited: