Tag mismatch?
#1

Код:
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?
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)