warning 213: tag mismatch
#1

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

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];
Reply
#3

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)