SA-MP Forums Archive
[MYSQL] Errors [R5] - 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: [MYSQL] Errors [R5] (/showthread.php?tid=626750)



[MYSQL] Errors [R41-2] - DerickClark - 19.01.2017

I had followed:
Код:
https://sampforum.blast.hk/showthread.php?tid=574714

Код:
(119) : error 017: undefined symbol "mysql_log"
(276) : error 017: undefined symbol "mysql_format"
(276) : warning 202: number of arguments does not match definition
(276) : warning 202: number of arguments does not match definition
(276) : warning 202: number of arguments does not match definition
(277) : error 017: undefined symbol "mysql_tquery"
(319) : error 017: undefined symbol "mysql_format"
(319) : error 017: undefined symbol "query"
(319) : error 029: invalid expression, assumed zero
(319) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.



Re: [MYSQL] Errors [R5] - azzerking - 19.01.2017

Are you including the correct version of mysql's include file?

As it looks to me, as if you forgot to update the include.


Re: [MYSQL] Errors [R5] - DerickClark - 19.01.2017

hm..


Re: [MYSQL] Errors [R5] - azzerking - 19.01.2017

At the top of the include file, it will say the version it is.

the Newest one I believe is R41-2 ?

ALSO: LOG_ALL? mysql_log( ERROR | WARNING ); ?

As for the tag mismatch, the function is expecting a string, float or int, and you have passed in something else. As for the query, you just need to create a variable called query that stores the size of the mysql query.


Re: [MYSQL] Errors [R5] - DerickClark - 19.01.2017

[R41-2] Error Code.

Код:
(267) : warning 213: tag mismatch
mysql_format(mysql, query, sizeof(query), "SELECT `Password`, `ID` FROM `accounts` WHERE `Name` = '%e' LIMIT 1", playername);
Код:
(268) : warning 213: tag mismatch
  mysql_tquery(mysql, query, "OnAccountCheck", "i", playerid);
Код:
(310) : warning 213: tag mismatch
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `SCORE`= %i WHERE `ID` = '%d'", GetPlayerScore(playerid), PlayerInfo[playerid][ID]);
Код:
(311) : warning 213: tag mismatch
mysql_tquery(mysql, query, "", "");
Код:
(590) : warning 213: tag mismatch
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", playername);
Код:
(591) : warning 213: tag mismatch
mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid);
Код:
(616) : warning 213: tag mismatch
mysql_format(mysql, query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Password`, `IP`, `Admin`, `VIP`, `Money`) VALUES ('%e', '%e', '%e', 0, 0, 0)", playername, PlayerInfo[playerid][Password], playerip);
Код:
(617) : warning 213: tag mismatch
mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);

Код:
(678) : error 017: undefined symbol "cache_get_field_content_int"
(679) : error 017: undefined symbol "cache_get_field_content_int"
(680) : error 017: undefined symbol "cache_get_field_content_int"
Код:
    PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0, "Admin");
    PlayerInfo[playerid][VIP] = cache_get_field_content_int(0, "VIP");
    PlayerInfo[playerid][Money] = cache_get_field_content_int(0, "Money");



Re: [MYSQL] Errors [R5] - azzerking - 20.01.2017

Read this: Link

It will explain how to setup and convert your current function to the new system.


Re: [MYSQL] Errors [R5] - DerickClark - 20.01.2017

i do not understand, can you give me examples?


Re: [MYSQL] Errors [R5] - X337 - 20.01.2017

For those tag mismatch warnings, you just need a MySQL tag for your mysql connection variable.
Example:
Код:
new MySQL:mysql;
// ....
and for those undefined symbol errors, cache_get_field_content renamed to cache_get_value_name since R40.


Re: [MYSQL] Errors [R5] - DerickClark - 20.01.2017

Quote:
Originally Posted by X337
Посмотреть сообщение
For those tag mismatch warnings, you just need a MySQL tag for your mysql connection variable.
Example:
Код:
new MySQL:mysql;
// ....
and for those undefined symbol errors, cache_get_field_content renamed to cache_get_value_name since R40.
Код:
(669) : warning 202: number of arguments does not match definition
Код:
PlayerInfo[playerid][pVIP] = cache_get_value_name(0, "VIP");



Re: [MYSQL] Errors [R5] - X337 - 20.01.2017

Код:
cache_get_value_name_int(0, "VIP", PlayerInfo[playerid][pVIP]);
https://sampwiki.blast.hk/wiki/MySQL/R40...get_value_name