Tag mismatch
#1

- This is the line it says tag mismatch = PlayerInfo[i][pArmour] = armour;

i get an warning = Tag mismatch, my code is:

Код:
       new Float:armour;
       GetPlayerArmour(i, armour);
       SetPlayerArmour(i, armour);
       PlayerInfo[i][pArmour] = armour;
       OnPlayerUpdate(i);
:S
Reply
#2

Is pArmour a float value?
Reply
#3

It's the same as pLevel, pCash, in LA-RP/Godfather...?
Reply
#4

It should be a float value, like FloatArmour or you could use a floatround function to round it to an integer.
Reply
#5

, it works with other things, this is my whole code...

Код:
public CheckArmour()
{
  for (new i=0; i < MAX_PLAYERS; i++)
  {
    if (IsPlayerConnected(i))
    {
       new Float:armour;
       GetPlayerArmour(i, armour);
       SetPlayerArmour(i, armour);
       PlayerInfo[i][pArmour] = armour;
       OnPlayerUpdate(i);
     }
  }
}
pArmour is just stored as a number, and on login it sets that number to the players armour.

SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]); - That works on login.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)