SA-MP Forums Archive
MySQL Stock 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 Stock error (/showthread.php?tid=627012)



MySQL Stock error - AndreiWow - 22.01.2017

Код:
stock LoginPlayer(playerid,const password[])
{
	new EscapedText[60];
	mysql_real_escape_string(password, EscapedText);
	format(Query,sizeof(Query),"SELECT * FROM `Users` WHERE `Username` = '%s' AND `Password` = '%s'",GetPName(playerid),EscapedText);
	mysql_query(Query);
	mysql_store_result();
	if(mysql_num_rows() != 0)
	{
		SendClientMessage(playerid,green,"You have been logged in!");
		LoadStats(playerid);
	}
	else
	{
		SendClientMessage(playerid,red,"Wrong password!");
		Kick(playerid);
	}
	mysql_free_result();
	return 1;
}

Why do I get those errors?:
Код:
C:\Users\andrei\Desktop\Scripting SA-MP\Advanced Roleplay (IBP)\gamemodes\andrei.pwn(25) : error 017: undefined symbol "mysql_real_escape_string"
C:\Users\andrei\Desktop\Scripting SA-MP\Advanced Roleplay (IBP)\gamemodes\andrei.pwn(26) : error 017: undefined symbol "Query"
C:\Users\andrei\Desktop\Scripting SA-MP\Advanced Roleplay (IBP)\gamemodes\andrei.pwn(26) : error 017: undefined symbol "Query"
C:\Users\andrei\Desktop\Scripting SA-MP\Advanced Roleplay (IBP)\gamemodes\andrei.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\andrei\Desktop\Scripting SA-MP\Advanced Roleplay (IBP)\gamemodes\andrei.pwn(26) : fatal error 107: too many error messages on one line

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


5 Errors.



Re: MySQL Stock error - AndreiWow - 22.01.2017

It was due to the version of mysql, sorry.


Re: MySQL Stock error - PaRking - 22.01.2017

Ur Probleme easy for fix it see This (https://sampforum.blast.hk/showthread.php?tid=237464)