• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Help with Script - Mana & HP Points Count

Progenosis

Member
Joined
Sep 6, 2011
Messages
131
Reaction score
18
Hi everyone, this time I'm loolking for help to solve an error shown on the console with a specific script.

This is the error shown:

errorConsole_zps8538534d.png


This is the script:

Code:
--///True = 0.3///-- & --///False = 0.2///--
local tfs_version = true
local otswe_updatetime = 1 -- Seconds
function updateMH(cid)
    if isPlayer(cid) then
                update = addEvent(updateMH, otswe_updatetime*1000, cid)
    end
    if tfs_version == true then
        doPlayerSendCancel(cid, "Health Points: "..getCreatureHealth(cid).."/"..getCreatureMaxHealth(cid).."      Mana Points: "..getCreatureMana(cid).."/"..getCreatureMaxMana(cid)..".")
        else
        doPlayerSendCancel(cid, "Health Points: "..getPlayerHealth(cid).."/"..getPlayerMaxHealth(cid).."      Mana Points: "..getPlayerMana(cid).."/"..getPlayerMaxMana(cid)..".")
        end
    return true
end
function onLogin(cid)
    if isPlayer(cid) then
        update = addEvent(updateMH, 1*1, cid)
        return true
    end
end
function onLogout(cid)
    if isPlayer(cid) then
        stopEvent(update)
        return true
    end
end

How could I solve the error?

Help please :)
 
Back
Top