SA-MP Forums Archive
warning 213: 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: warning 213: tag mismatch (/showthread.php?tid=455037)



warning 213: tag mismatch - Micius - 31.07.2013

I want to get it from mysql, but getting warning:
warning 213: tag mismatch

Gender is a boolean.
mysql_fetch_field_row(savingstring, "Gender"); PlayerData[playerid][Gender] = strval(savingstring);


Re: warning 213: tag mismatch - Micius - 31.07.2013

Up..


Re: warning 213: tag mismatch - CaveDweller - 31.07.2013

Can you please show the definition of Gender?


Re: warning 213: tag mismatch - Micius - 31.07.2013

enum pData
{
....................
bool:Gender,
.....................
}
new PlayerData[MAX_PLAYERS][pData];


Re: warning 213: tag mismatch - dEcooR - 31.07.2013

What is after PlayerData[playerid][Gender] =


Re: warning 213: tag mismatch - CaveDweller - 31.07.2013

strval returns an integer, you're trying to store it as a boolean.

pawn Код:
mysql_fetch_field_row(savingstring, "Gender");
switch(strval(savingstring))
{
    case 0: PlayerData[playerid][Gender] = false;
    case 1: PlayerData[playerid][Gender] = true;
}
PlayerData[playerid][Gender] = strval(savingstring);[/pawn]


Re: warning 213: tag mismatch - dEcooR - 31.07.2013

Yes probably you are using = 0/1 but you have to use = true/false when ur used bool


Re: warning 213: tag mismatch - Micius - 31.07.2013

Thanks, it helped.