Problem with a_mysql | Making login/register mysql based
#1

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

Find a recent tutorial, preferably from the last six months, and work off of that. Don't use outdated stuff.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
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?
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=461766
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)