Tag mismatch
#1

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?
Reply
#2

You would have missed Float.
pawn Code:
Float:pHealth
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)