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

Anyone?
Reply
#3

Try using mysql_tquery. https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_tquery
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)