MySQL Stock error
#1

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

It was due to the version of mysql, sorry.
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)