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=469437)



Tag mismatch? - Hassano - 13.10.2013

Код:
public OnPlayerDisconnect(playerid, reason)
{
	PlayerInfo[playerid][VirtualWorld] = GetPlayerInterior(playerid);
	PlayerInfo[playerid][Interior] = GetPlayerVirtualWorld(playerid);
	GetPlayerFacingAngle(playerid, PlayerInfo[playerid][Angle]);
	GetPlayerPos(playerid, PlayerInfo[playerid][PosX], PlayerInfo[playerid][PosY], PlayerInfo[playerid][PosZ]);
	GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
	GetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
	
    
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"Stats");
    INI_WriteInt(File,"Cash", GetPlayerMoney(playerid));
    INI_WriteInt(File,"Admin", PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"Kills", PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths", PlayerInfo[playerid][pDeaths]);
    INI_WriteFloat(File,"PosX", PlayerInfo[playerid][PosX]);
    INI_WriteFloat(File,"PosY", PlayerInfo[playerid][PosY]);
    INI_WriteFloat(File,"PosZ", PlayerInfo[playerid][PosZ]);
    INI_WriteFloat(File,"Angle", PlayerInfo[playerid][Angle]);
    INI_WriteInt(File,"Interior", GetPlayerInterior(playerid));
    INI_WriteInt(File,"VirtualWorld", GetPlayerVirtualWorld(playerid));
    INI_Close(File);
    return 1;
}
There is two tag mismatches with the lines
Quote:

GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
GetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);

Can you help me fix?


Re: Tag mismatch? - Sublime - 13.10.2013

PlayerInfo[playerid][pHealth] and PlayerInfo[playerid][pArmour] is not a float. Make pHealth and pArmor as a float in the enum it's located under.