SA-MP Forums Archive
Mysql format Error - 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 format Error (/showthread.php?tid=614412)



Mysql format Error - cyberlord - 08.08.2016

Hello guys i just start making my new server and face a problem with a mysql , i download a R6 mysql plugin , and now start making a registration and login system , but got error this error :
PHP код:
C:\Users\Winfows\Desktop\samp 037\gamemodes\GM.pwn(119) : error 017undefined symbol "mysql_format"
C:\Users\Winfows\Desktop\samp 037\gamemodes\GM.pwn(119) : warning 202number of arguments does not match definition
C
:\Users\Winfows\Desktop\samp 037\gamemodes\GM.pwn(119) : warning 202number of arguments does not match definition
C
:\Users\Winfows\Desktop\samp 037\gamemodes\GM.pwn(119) : warning 202number of arguments does not match definition
C
:\Users\Winfows\Desktop\samp 037\gamemodes\GM.pwn(120) : error 035argument type mismatch (argument 1
i have included plugin into server.cfg and its shows successfully loaded , and also pawn include a_mysql
PHP код:
#include <a_samp>
#include <core>
#include <a_mysql>
#pragma tabsize 0 
and here is my onplayerconnect account check code :
PHP код:
/////ACCOUNT CHECK//////////
     
new query[128]; 
    
GetPlayerName(playeridName[playerid], 24); 
    
GetPlayerIp(playeridIP[playerid], 16); 
      
mysql_format(sqlconnectquerysizeof(query),"SELECT `password`, `id` FROM `users` WHERE `username` = '%e' LIMIT 1"Name[playerid]);
    
mysql_query(sqlconnectquery"OnAccountCheck""i"playerid); 
i haven't done samp coding long time but for me its seems everything okay do not know why mysql_format are undefined , please help


Re: Mysql format Error - Dejan12345 - 08.08.2016

add in top of your script #define mysql_format 1312


Re: Mysql format Error - cyberlord - 08.08.2016

Quote:
Originally Posted by Dejan12345
Посмотреть сообщение
add in top of your script #define mysql_format 1312
i think that should be done by plugin and include


Re: Mysql format Error - Fairuz - 08.08.2016

Don't even listening to him..
'mysql_format' was added on mysql r33+,you should download the newest one.(r39-5)


Re: Mysql format Error - d1git - 08.08.2016

https://github.com/pBlueG/SA-MP-MySQ...ases/tag/R39-5


Re: Mysql format Error - Sanady - 08.08.2016

Код:
format(query, sizeof(query),"SELECT `password`, `id` FROM `users` WHERE `username` = '%s' LIMIT 1", Name[playerid]); // %e changed to %s 
    mysql_query(query, "OnAccountCheck", "i", playerid);
I think this should work, I am user of R6 so try this.


Re: Mysql format Error - Shinja - 08.08.2016

Quote:
Originally Posted by cyberlord
Посмотреть сообщение
PHP код:
    mysql_query(sqlconnectquery"OnAccountCheck""i"playerid); 
This should be a threaded query
PHP код:
    mysql_tquery(sqlconnectquery"OnAccountCheck""i"playerid); 



Re: Mysql format Error - AndySedeyn - 08.08.2016

Quote:
Originally Posted by Sanady
Посмотреть сообщение
Код:
format(query, sizeof(query),"SELECT `password`, `id` FROM `users` WHERE `username` = '%s' LIMIT 1", Name[playerid]); // %e changed to %s 
    mysql_query(query, "OnAccountCheck", "i", playerid);
I think this should work, I am user of R6 so try this.
If you want SQL injections to be possible, sure. At least sanitize your database inputs!