PDA

View Full Version : Problem with a_mysql | Making login/register mysql based


akib
09/04/2017, 08:48 AM
hi, i am newbie in pawno
i am trying to make a login register system mysql based
but facing two problems.....
D:\GTA San Andreas\Server\gamemodes\cdm.pwn(68) : error 035: argument type mismatch (argument 1)
D:\GTA San Andreas\Server\gamemodes\cdm.pwn(69) : error 017: undefined symbol "mysql_store_result"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


The gm code [only DB info's included] :

#include <a_mysql>
#include <sscanf2>

#define SQL_HOST ""
#define SQL_USER ""
#define SQL_PASS ""
#define SQL_DB ""

public OnGameModeInit()
{
mysql_connect("SQL_HOST","SQL_USER","SQL_PASS","SQL_DB");
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnPlayerConnect(playerid)
{
new query[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(query,sizeof(query),"SELECT * FROM accounts WHERE username = %s",name);

mysql_query(query);
mysql_store_result();

return 1;
}


Please Help mE :/
thanks in advance :)

Vince
09/04/2017, 09:01 AM
Find a recent tutorial, preferably from the last six months, and work off of that. Don't use outdated stuff.

akib
09/04/2017, 09:02 AM
Find a recent tutorial, preferably from the last six months, and work off of that. Don't use outdated stuff.


Thanks for your reply.
Can u plz give me a link for latest tutorial?

verlaj
09/04/2017, 02:15 PM
http://forum.sa-mp.com/showthread.php?t=461766