Nevalopo
Demigod
Hi! I have a little problem with my soul regen script for voc 9 this is what i have so far:
It's working fine and regens soul but im getting spammed error whenever i login with another char
This is the error im getting:
Anyone have ideas where i gone wrong in the script?
Also, Running 0.4 tfs
Code:
local vocations,max_soul = {{9}},{200}
function onThink(interval, lastExecution, thinkInterval)
for _, cid in ipairs(getPlayersOnline()) do
local maxsoul = isInArray(vocations[1],getPlayerVocation(cid)) and max_soul[1] or max_soul[2]
if getPlayerSoul(cid) < maxsoul then
doPlayerAddSoul(cid, 1)
end
end
return TRUE
end
It's working fine and regens soul but im getting spammed error whenever i login with another char
This is the error im getting:
Anyone have ideas where i gone wrong in the script?
Also, Running 0.4 tfs