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



warning 213: tag mismatch - TheDeath - 12.12.2013

Hello guys, I have a problem with my enum.
I want to ask what does this error means. Don't just tell me how to fix it please.
I just can't understand whats the problem with my integers.
Here is my enum declaration:
pawn Код:
enum Data
{
    bool:logged,
    int:score,
    int:money,
    int:kills,
    int:deaths,
};

new Player[MAX_PLAYERS][Data];
Here is the function that I call:
pawn Код:
/*
 * WARRNING - USE THIS ONLY ON OnPlayerDisconnect()!!!!!!
 */

stock ResetPlayeridData(playerid){
Player[playerid][logged] = false; //87
Player[playerid][score] = 0; //88
Player[playerid][money] = 0; //89
Player[playerid][kills] = 0; //90
Player[playerid][deaths] = 0; //91
}
Errors (i have commented the lines on the code):
Код:
F:\Dropbox\SAMP Server\gamemodes\cnr.pwn(88) : warning 213: tag mismatch
F:\Dropbox\SAMP Server\gamemodes\cnr.pwn(89) : warning 213: tag mismatch
F:\Dropbox\SAMP Server\gamemodes\cnr.pwn(90) : warning 213: tag mismatch
F:\Dropbox\SAMP Server\gamemodes\cnr.pwn(91) : warning 213: tag mismatch
I call this function only OnPlayerDisconnect and it's the only function I call there.


Re: warning 213: tag mismatch - Tayab - 12.12.2013

I think you don't need to add int in front of the enum variables. So be this.

pawn Код:
enum Data
{
    bool:logged,
    score,
    money,
    kills,
    deaths
};

new Player[MAX_PLAYERS][Data];



Re: warning 213: tag mismatch - TheDeath - 12.12.2013

Thank you for the help.
But I can't understand whats the problem to set the type of data ?


Re: warning 213: tag mismatch - AmigaBlizzard - 13.12.2013

Try "Int:myvariable" when declaring it, with a capital I.
Just like Float:myfloat.

Made the same mistake yesterday by putting "float:myvariable" with a small f.


Re: warning 213: tag mismatch - Emmet_ - 13.12.2013

Quote:
Originally Posted by TheDeath
Посмотреть сообщение
Thank you for the help.
But I can't understand whats the problem to set the type of data ?
lol

There's no "Int:" prefix. PAWN is a typeless language so variables only consist of cells - it must either be an integer OR a string (only things like booleans and float values are only explicitly predefined types).