Error 213: tag mismatch -
jimjim135 - 15.05.2011
Hi, When attempting to configure my gamemode, I get the following error:
C:\Users\samp\Desktop\SA-MP Server\gamemodes\3krp.pwn(859) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Below is the coding:
Код:
public OnPlayerDisconnect(playerid, reason)
{
new str[70], Float:x, Float:y, Float:z, health;
GetPlayerName(playerid, Name, sizeof(Name));
aDuty{playerid} = 0;
SavePlayer(playerid);
switch (reason) {
case 0:
{
format(str, sizeof(str), "*** %s (%d) has left the server (Timeout)", Name, playerid);
PlayerInfo[playerid][pCrashed] = 1;
GetPlayerPos(playerid, x, y, z);
PlayerInfo[playerid][pCrashX] = x;
PlayerInfo[playerid][pCrashY] = y;
PlayerInfo[playerid][pCrashZ] = z;
}
case 1:
{
format(str, sizeof(str), "*** %s (%d) has left the server (Leaving)", Name, playerid);
}
case 2: format(str, sizeof(str), "*** %s (%d) has left the server (Kicked/Banned)", Name, playerid);
}
SendClientMessageToAll(COLOR_GREY, str);
GetPlayerHealth(playerid, health);
PlayerInfo[playerid][pHealth] = health;
SavePlayer(playerid);
return 1;
}
Re: Error 213: tag mismatch -
Lynn - 15.05.2011
What is the coding on just that one line?
Re: Error 213: tag mismatch -
jimjim135 - 15.05.2011
Sorry, I forgot to clarify that. The error is on line "GetPlayerHealth(playerid, health);"
Re: Error 213: tag mismatch -
Lynn - 15.05.2011
pawn Код:
new str[70], Float:x, Float:y, Float:z, health;
Needs to be
pawn Код:
new str[70], Float:x, Float:y, Float:z, Float:health;
You forgot to define Health, as a float.
Re: Error 213: tag mismatch -
jimjim135 - 15.05.2011
I had it before as a float and got the same error on a different line. I've now made it a Float, and I recieve the same error on this line:
PlayerInfo[playerid][pHealth] = health;
Re: Error 213: tag mismatch - Emmet_ - 15.05.2011
Go to your PlayerInfo enum, and replace:
with:
Re: Error 213: tag mismatch -
Lynn - 15.05.2011
PlayerInfo[playerid][pHealth] = GetPlayerHealth(playerid, health);
Re: Error 213: tag mismatch -
jimjim135 - 15.05.2011
the PlayerInfo[playerid][pHealth] = health is what records their health to their profile.