Need help with mysql_query();
#1

I am trying to use mysql_query(query);
on this code.
Код:
public OnPlayerConnect(playerid)
{
	new query[126], pName[MAX_PLAYER_NAME];
	
	GetPlayerName(playerid, pName, sizeof(pName));
	
	format(query, sizeof(query), "SELECT * FROM accounts WHERE name = '%s'", pName);
	mysql_query(query);
	mysql_store_result();
	
	if(mysql_num_rows() == 1)
	{
	    new string[256];
	    format(string, sizeof(string), "Welcome to MaxZone RPG server.\n\nPlease enter your password to login.");
	    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_PASSWORD, "MaxZone - Login", string, "Login", "Cancel");
	}
	else
	{
	    new string2[256];
	    format(string2, sizeof(string2), "Welcome to MaxZone RPG server.\n\nPlease register your password.");
	    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "MaxZone - Register", string2, "Register", "Cancel");
	}
	
	return 1;
}
But for some reason i get the error "error 035: argument type mismatch (argument 1)".
How can i fix this?
Reply


Messages In This Thread
Need help with mysql_query(); - by danielpalade - 22.12.2014, 04:25
Re: Need help with mysql_query(); - by danielpalade - 22.12.2014, 18:11
Re: Need help with mysql_query(); - by Nimrod - 22.12.2014, 21:34

Forum Jump:


Users browsing this thread: 1 Guest(s)