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

Pages: 1 2


Warning 213: Tag Mismatch ! - Healian - 17.08.2012

I have enums and i want to set value to them as normal i tried to do this

pawn Code:
new Float:x, Float:y, Float:z;

GetPlayerPos(playerid, x, y, z);

pInfo[playerid][pX] = x;
pInfo[playerid][pY] = y;
pInfo[playerid][pZ] = z;
but i get this warning on compiling

pawn Code:
Current directory: C:\Users\Healian\Desktop\SA-MP\samp03e_svr_R2_win32\gamemodes
ARole.pwn(1109) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warnings.
================ READY ================



Re: Warning 213: Tag Mismatch ! - FalconX - 17.08.2012

Quote:
Originally Posted by Healian
View Post
I have enums and i want to set value to them as normal i tried to do this

pawn Code:
new Float:x, Float:y, Float:z;

GetPlayerPos(playerid, x, y, z);

pInfo[playerid][pX] = x;
pInfo[playerid][pY] = y;
pInfo[playerid][pZ] = z;
but i get this warning on compiling

pawn Code:
Current directory: C:\Users\Healian\Desktop\SA-MP\samp03e_svr_R2_win32\gamemodes
ARole.pwn(1109) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warnings.
================ READY ================
Do you have pX, pY and pZ in an enum you've made?


Re: Warning 213: Tag Mismatch ! - Healian - 17.08.2012

yea here is the code

pawn Code:
enum pINF
{
    prSTEP,
    pSQ,
    pSA,
    pIP,
    pRDATE,
    pADMINLVL,
    pVIPLVL,
    pPLAYERRANK,
    pWANTEDLVL,
        pSCORE,
        pMONEY,
        pKILLS,
        pDEATHS,
    pX,
    pY,
    pZ,
    pINTERIOR,
    pWORLD,
    pHEALTH,
    pARMOR,
    pSKIN,
    pWEAP1,
    pWEAP1A,
    pWEAP2,
    pWEAP2A,
    pWEAP3,
    pWEAP3A,
    pWEAP4,
    pWEAP4A,
    pWEAP5,
    pWEAP5A,
    pWEAP6,
    pWEAP6A,
    pVEHI1,
    pVEHI2,
    pVEHI3,
    pVEHI4,
    pVEHI5,
    pJAILED,
    pJAILTIME,
    pWARNINGS,
    pMUTED,
    pCOLOR
};

new pInfo[MAX_PLAYERS][pINF];



Re: Warning 213: Tag Mismatch ! - DreamOnIt - 17.08.2012

pX must be Float:


Re: Warning 213: Tag Mismatch ! - Healian - 17.08.2012

mmm but i made all the saving and retrieving code as pX not a Float what should i do now

when i make them Floats i get the warnings in another areas in the code


Re: Warning 213: Tag Mismatch ! - DreamOnIt - 17.08.2012

Just add Float: before px, py and pz...


Re: Warning 213: Tag Mismatch ! - Healian - 17.08.2012

i know but i get another warnings when i convert them to floats cuz i have a SQLLITE Update query which take the value from the pX,pY,pZ and saves to the database


Re: Warning 213: Tag Mismatch ! - FalconX - 17.08.2012

Quote:
Originally Posted by Healian
View Post
i know but i get another warnings when i convert them to floats cuz i have a SQLLITE Update query which take the value from the pX,pY,pZ and saves to the database
it should be:

pawn Code:
Float:pX,
Float:pY,
Float:pZ,
Show us the warnings?


Re: Warning 213: Tag Mismatch ! - Healian - 17.08.2012

mmm What about this when i made them Floats the warnings goes there

pawn Code:
format(Query, sizeof(Query), "UPDATE `PersonalInfo` SET PLAYERRANK = '%d', WANTEDLEVEL = '%d', SCORE = '%d', CASH = '%d', KILLS = '%d', DEATHS = '%d', X = '%d', Y = '%d', Z = '%d', INTERIOR = '%d', WORLD = '%d', HEALTH = '%d', ARMOR = '%d', SKIN = '%d' WHERE `NAME` = '%s'", DB_Escape(pInfo[playerid][pPLAYERRANK]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pWANTEDLVL]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pSCORE]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pMONEY]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pKILLS]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pDEATHS]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pX]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pY]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pZ]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pINTERIOR]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pWORLD]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pHEALTH]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pARMOR]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pSKIN]),
                                                                                                                                                                                                                                                                                       DB_Escape(pName));



Re: Warning 213: Tag Mismatch ! - DreamOnIt - 17.08.2012

Then change the type of the corresponding fields on your db and instead of %d use %f


Re: Warning 213: Tag Mismatch ! - FalconX - 17.08.2012

Quote:
Originally Posted by DreamOnIt
View Post
The change the type of the corresponding fields on your db
now save the float as a float not "%d" and see if it get's fix. use "%f" instead of "%d".


Re: Warning 213: Tag Mismatch ! - Healian - 17.08.2012

i tried to change the %d to %s and %f but same warnings


Re: Warning 213: Tag Mismatch ! - FalconX - 17.08.2012

Quote:
Originally Posted by Healian
View Post
i tried to change the %d to %s and %f but same warnings
Show what warnings you get?


Re: Warning 213: Tag Mismatch ! - DreamOnIt - 17.08.2012

Not %s, %f! And px, py and pz must be tagged Float:
You MUST do that :P


Re: Warning 213: Tag Mismatch ! - Healian - 17.08.2012

pawn Code:
ARole.pwn(817 -- 823) : warning 213: tag mismatch
ARole.pwn(817 -- 824) : warning 213: tag mismatch
ARole.pwn(817 -- 825) : warning 213: tag mismatch
ARole.pwn(817 -- 828) : warning 213: tag mismatch
ARole.pwn(817 -- 829) : warning 213: tag mismatch
SAME

Quote:
Originally Posted by DreamOnIt
View Post
Not %s, %f! And px, py and pz must be tagged Float:
You MUST do that :P
I already tagged them as floats in the enum so the first warnings disappeared but the warnings gone to my data abse saving code as i told

Snippet from enums after i added float to them

pawn Code:
Float:pX,
    Float:pY,
    Float:pZ,
    pINTERIOR,
    pWORLD,
    Float:pHEALTH,
    Float:pARMOR,



Re: Warning 213: Tag Mismatch ! - FalconX - 17.08.2012

Quote:
Originally Posted by DreamOnIt
View Post
Not %s, %f! And px, py and pz must be tagged Float:
You MUST do that :P
He did it and now if he want to save a float he must use %f ...

Quote:

ARole.pwn(817 -- 823) : warning 213: tag mismatch
ARole.pwn(817 -- 824) : warning 213: tag mismatch
ARole.pwn(817 -- 825) : warning 213: tag mismatch
ARole.pwn(817 -- 82 : warning 213: tag mismatch
ARole.pwn(817 -- 829) : warning 213: tag mismatch

LINES?


Re: Warning 213: Tag Mismatch ! - Rudy_ - 17.08.2012

the pX,pY,pZ are the errors at first, and pawn can't show all errors at same time.
So change them to FloatX,FloatY,FloatZ
and the compile, show me the lines+errors


Re: Warning 213: Tag Mismatch ! - Healian - 17.08.2012

I ALREADY Changed the pX,pY,pZ in enums to FloatX,FloatY,FloatZ

and here is my lines which get the warnings now

pawn Code:
format(Query, sizeof(Query), "UPDATE `PersonalInfo` SET PLAYERRANK = '%d', WANTEDLEVEL = '%d', SCORE = '%d', CASH = '%d', KILLS = '%d', DEATHS = '%d', X = '%d', Y = '%d', Z = '%d', INTERIOR = '%d', WORLD = '%d', HEALTH = '%d', ARMOR = '%d', SKIN = '%d' WHERE `NAME` = '%s'", DB_Escape(pInfo[playerid][pPLAYERRANK]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pWANTEDLVL]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pSCORE]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pMONEY]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pKILLS]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pDEATHS]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pX]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pY]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pZ]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pINTERIOR]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pWORLD]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pHEALTH]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pARMOR]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pSKIN]),
                                                                                                                                                                                                                                                                                       DB_Escape(pName));
WARNINGS
pawn Code:
Current directory: C:\Users\Healian\Desktop\SA-MP\samp03e_svr_R2_win32\gamemodes
ARole.pwn(815 -- 821) : warning 213: tag mismatch
ARole.pwn(815 -- 822) : warning 213: tag mismatch
ARole.pwn(815 -- 823) : warning 213: tag mismatch
ARole.pwn(815 -- 826) : warning 213: tag mismatch
ARole.pwn(815 -- 827) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Warnings.
================ READY ================
Note : i tried to change the %d in the query to %f with no luck


My Enums after edit [fixed the first warnings that i opened the thread for but got the new warnings that i represented above ]

pawn Code:
enum pINF
{
    prSTEP,
    pSQ,
    pSA,
    pIP,
    pRDATE,
    pADMINLVL,
    pVIPLVL,
    pPLAYERRANK,
    pWANTEDLVL,
    pSCORE,
    pMONEY,
    pKILLS,
    pDEATHS,
    Float:pX,
    Float:pY,
    Float:pZ,
    pINTERIOR,
    pWORLD,
    Float:pHEALTH,
    Float:pARMOR,
    pSKIN,
    pWEAP1,
    pWEAP1A,
    pWEAP2,
    pWEAP2A,
    pWEAP3,
    pWEAP3A,
    pWEAP4,
    pWEAP4A,
    pWEAP5,
    pWEAP5A,
    pWEAP6,
    pWEAP6A,
    pVEHI1,
    pVEHI2,
    pVEHI3,
    pVEHI4,
    pVEHI5,
    pJAILED,
    pJAILTIME,
    pWARNINGS,
    pMUTED,
    pCOLOR
};

new pInfo[MAX_PLAYERS][pINF];



Re: Warning 213: Tag Mismatch ! - [ABK]Antonio - 17.08.2012

Quote:
Originally Posted by Healian
View Post
I have enums and i want to set value to them as normal i tried to do this

pawn Code:
new Float:x, Float:y, Float:z;

GetPlayerPos(playerid, x, y, z);

pInfo[playerid][pX] = x;
pInfo[playerid][pY] = y;
pInfo[playerid][pZ] = z;
but i get this warning on compiling

pawn Code:
Current directory: C:\Users\Healian\Desktop\SA-MP\samp03e_svr_R2_win32\gamemodes
ARole.pwn(1109) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warnings.
================ READY ================
pawn Code:
GetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]);
Much simpler, not really necessary to create three new variables when they aren't needed.


You could always use floatstr to convert it from a string back to a float (the query result when loading).

Also..You don't need DB_Escape when dealing with things non user input most of the time. All it's doing is slowing down your query.


Re: Warning 213: Tag Mismatch ! - Healian - 17.08.2012

you talked about my first problem i thank you very much but my problem now gone to the DB query


HERE :
Quote:
Originally Posted by Healian
View Post
I ALREADY Changed the pX,pY,pZ in enums to FloatX,FloatY,FloatZ

and here is my lines which get the warnings now

pawn Code:
format(Query, sizeof(Query), "UPDATE `PersonalInfo` SET PLAYERRANK = '%d', WANTEDLEVEL = '%d', SCORE = '%d', CASH = '%d', KILLS = '%d', DEATHS = '%d', X = '%d', Y = '%d', Z = '%d', INTERIOR = '%d', WORLD = '%d', HEALTH = '%d', ARMOR = '%d', SKIN = '%d' WHERE `NAME` = '%s'", DB_Escape(pInfo[playerid][pPLAYERRANK]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pWANTEDLVL]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pSCORE]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pMONEY]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pKILLS]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pDEATHS]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pX]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pY]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pZ]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pINTERIOR]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pWORLD]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pHEALTH]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pARMOR]),
                                                                                                                                                                                                                                                                                       DB_Escape(pInfo[playerid][pSKIN]),
                                                                                                                                                                                                                                                                                       DB_Escape(pName));
WARNINGS
pawn Code:
Current directory: C:\Users\Healian\Desktop\SA-MP\samp03e_svr_R2_win32\gamemodes
ARole.pwn(815 -- 821) : warning 213: tag mismatch
ARole.pwn(815 -- 822) : warning 213: tag mismatch
ARole.pwn(815 -- 823) : warning 213: tag mismatch
ARole.pwn(815 -- 826) : warning 213: tag mismatch
ARole.pwn(815 -- 827) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Warnings.
================ READY ================
Note : i tried to change the %d in the query to %f with no luck


My Enums after edit [fixed the first warnings that i opened the thread for but got the new warnings that i represented above ]

pawn Code:
enum pINF
{
    prSTEP,
    pSQ,
    pSA,
    pIP,
    pRDATE,
    pADMINLVL,
    pVIPLVL,
    pPLAYERRANK,
    pWANTEDLVL,
    pSCORE,
    pMONEY,
    pKILLS,
    pDEATHS,
    Float:pX,
    Float:pY,
    Float:pZ,
    pINTERIOR,
    pWORLD,
    Float:pHEALTH,
    Float:pARMOR,
    pSKIN,
    pWEAP1,
    pWEAP1A,
    pWEAP2,
    pWEAP2A,
    pWEAP3,
    pWEAP3A,
    pWEAP4,
    pWEAP4A,
    pWEAP5,
    pWEAP5A,
    pWEAP6,
    pWEAP6A,
    pVEHI1,
    pVEHI2,
    pVEHI3,
    pVEHI4,
    pVEHI5,
    pJAILED,
    pJAILTIME,
    pWARNINGS,
    pMUTED,
    pCOLOR
};

new pInfo[MAX_PLAYERS][pINF];