TFS 0.3.5 (8.50)
Hello all, im using this system (Creatureevent OnGainExp) made by knightxd.
So i made this script.
creaturescripts.xml
creaturescripts/scripts/GainExpPrint.lua
creaturescripts/scripts/Login.lua
But when i do a login with any character in game, this returns a several times a variable number. Making the source crash.
maybe i'm using it in a wrong way?
It should be like this?
Hello all, im using this system (Creatureevent OnGainExp) made by knightxd.
So i made this script.
creaturescripts.xml
XML:
<event type="gainexp" name="GainExpPrint" event="script" value="GainExpPrint.lua"/>
creaturescripts/scripts/GainExpPrint.lua
Lua:
function onGainExp(cid, value)
print(value)
end
creaturescripts/scripts/Login.lua
Lua:
registerCreatureEvent(cid, "GainExpPrint")
But when i do a login with any character in game, this returns a several times a variable number. Making the source crash.
maybe i'm using it in a wrong way?
It should be like this?