Mysql format Error
#1

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

add in top of your script #define mysql_format 1312
Reply
#3

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
Reply
#4

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

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

Код:
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.
Reply
#7

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); 
Reply
#8

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)