[SOLVED by X337] warning 213: tag mismatch -
Sibuscus - 19.03.2017
Everytime I use these [mysql_format & mysql_tquery]:
Код:
mysql_format(g_Sql, query, sizeof(query), "UPDATE `accounts` SET `Cash` = '%i' WHERE `ID` = '%i'",
PlayerInfo[playerid][Cash], PlayerInfo[playerid][ID]);
mysql_tquery(g_Sql, query, "", "");
I get warning 213: tag mismatch.
My enum is:
Код:
ID,
Name[MAX_PLAYER_NAME],
Password[129],
Salt[11],
IP[16],
Level,
Admin,
Cash,
Kills,
Deaths,
Float:PosX,
Float:PosY,
Float:PosZ,
Float:PosA,
Warnings,
isBanned,
Should I use
format instead of
mysql_format
Even when I use just
mysql_tquery(g_Sql, query) instead of
mysql_tquery(g_Sql, query, "", "") I still get warnings, and they ar e annoying. I want to get rid of them
SOLVED BY X337
and kindda by TitanX at the beginning, but I was too dumb to check the case sensitivity
Re: [Help] warning 213: tag mismatch -
TitanX - 19.03.2017
to
PHP код:
new MySQL:g_Sql;
Re: [Help] warning 213: tag mismatch -
Sibuscus - 19.03.2017
Quote:
Originally Posted by TitanX
to
PHP код:
new MySQL:g_Sql;
|
It was already like that...I know the changes after R40
Re: [Help] warning 213: tag mismatch -
TitanX - 19.03.2017
PHP код:
mysql_tquery(g_Sql, query) instead of mysql_tquery(g_Sql, query, "", "")
use
PHP код:
mysql_query(g_Sql, query)
and what version of include that you are using (open it and check)
Re: [Help] warning 213: tag mismatch -
oMa37 - 19.03.2017
How you defined
PlayerInfo? Can you show the entire enum?
Re: [Help] warning 213: tag mismatch -
Sibuscus - 19.03.2017
Quote:
Originally Posted by oMa37
How you defined PlayerInfo? Can you show the entire enum?
|
Код:
enum pInfo
{
//QUERY STORED DATABASE
ID,
Name[MAX_PLAYER_NAME],
Password[129],
IP[16],
Level,
Admin,
Cash,
Kills,
Deaths,
Float:PosX,
Float:PosY,
Float:PosZ,
Float:PosA,
Warnings,
isBanned,
//LastLogin,
//RegisterDate,
//NOT STORED INFO
pRIP, //When a player gets banned, this is activated
AOnDuty, //For the admins to go ON or OFF duty
ABusy, // When the admins are on duty to set tag to BUSY or AVAILABLE
PasswordFails, //If they input the password wrongly
} new PlayerInfo[MAX_PLAYERS][pInfo];
Ignore the pragma tabsize n shit, It's a perfect code in my pawn
Quote:
Originally Posted by TitanX
PHP код:
mysql_tquery(g_Sql, query) instead of mysql_tquery(g_Sql, query, "", "")
use
PHP код:
mysql_query(g_Sql, query)
and what version of include that you are using (open it and check)
|
I use R41-2 version, I've updated everything to the R40 standards as said
in the wiki page.
Код HTML:
mysql_tquery
Description:
Sends a query which will be executed in another thread and call a callback
(if there was one specified) when the execution is successfully finished.
Код HTML:
mysql_query
Description:
This native sends a non-threaded query to the MySQL server. The SA:MP server (the main PAWN thread)
waits until the query has been executed and then returns the stored cache handle.
I want a threaded query
I can't use mysql_query, I need mysql_tquery. From what I understand
tquery is like a transaction and
query fulfills all operations simultaneously . So tquery is supposed to wait for the operation to finish and then moves on to the next one, while query can be exploited, right?
Re: [Help] warning 213: tag mismatch -
Sibuscus - 21.03.2017
BUMP. How can I remove the warnings and still use
mysql_tquery and
mysql_format
Sorry for bumping, but I have 150 warnings all the same now.
Re: [Help] warning 213: tag mismatch -
AndySedeyn - 21.03.2017
Have you declared 'query' as an array?
EDIT: nevermind, this gives a different error. Are you sure your include is R40+?
Re: [Help] warning 213: tag mismatch -
Sibuscus - 22.03.2017
Quote:
Originally Posted by AndySedeyn
Have you declared 'query' as an array?
EDIT: nevermind, this gives a different error. Are you sure your include is R40+?
|
Query is declared as an array with 128 length
I'm 98% sure, when I open the include, this is what I get at the top
/**
* MySQL plugin R41-2
*/
I think the problem is something with the floats, but im not sure what, I mean I get that warning everytime I use tquery and mysql_format. I tried using just format and not mysql_format and it doesn't save on the database, so I have to use mysql_format, but even then, I still have 60 warnings for tquery.
Re: [Help] warning 213: tag mismatch -
AndySedeyn - 22.03.2017
The fact you get the error when not using the floats indicates that they are not the issue. Do you have multiple instances of the server package on your computer and is one of them using an older version of the include? If so, you may want to double check which editor is used (which instance of pawno.exe).
With pawno, you have to go directly to the server package in which this script is located > pawno folder > pawno.exe > open script > compile