SA-MP Forums Archive
Tag mismatch - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tag mismatch (/showthread.php?tid=665224)



Tag mismatch - SymonClash - 26.03.2019

Trying to make a custom health system:

pawn Code:
stock SetPlayerHP(playerid, hp)
{
    Player[playerid][pHealth] = hp;
    return 1;
}
OnPlayerSpawn:

pawn Code:
SetPlayerHP(playerid, 100);
But i'm getting tag mismatch at OnPlayerSpawn line. What's wrong?


Re: Tag mismatch - SiaReyes - 26.03.2019

You would have missed Float.
pawn Code:
Float:pHealth



Re: Tag mismatch - SymonClash - 26.03.2019

No, there is no need for float since this is not original Sa-Mp health system which uses SetPlayerHealth.

Mine is stored in pHealth variable and ranges from 0 to 97. Also i read it with "%d" or "%i" because it's an integer, not a float.

EDIT: I fixed.