Dead Connection MySQL
#1

I'm having a problem with MySQL, I'm trying to check if the player has an account with this:

Код:
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
	{
		new query[128];
        format(query, sizeof(query), "SELECT Level FROM players WHERE username = '%s'", playerName(playerid));
		if (mysql_num_rows() == 0)
		{
			gPlayerAccount[playerid] = 0;
 			new regstring[128];
			new regname[64];
			GetPlayerName(playerid,regname,sizeof(regname));
			format(regstring,sizeof(regstring),"{FFFFFF}• Bun venit, "#COL_RED2"%s\n• {FFFFFF}Nu ai cont.\n• Te rog sa te inregistrezi:",regname);
			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"Register",regstring,"Register","Exit");
		}
		else
		{
			new loginstring[128];
			new loginname[64];
			GetPlayerName(playerid,loginname,sizeof(loginname));
			format(loginstring,sizeof(loginstring),"{FFFFFF}• Bine ai venit, "#COL_RED2"%s\n• {FFFFFF}Acest nume este inregistrat.\n• Poti sa te loghezi:",loginname);
			ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Exit");
		}
	}
And I get this:

Код:
CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)
Reply


Messages In This Thread
Dead Connection MySQL - by .EnjatsRed. - 23.06.2014, 14:39
Re: Dead Connection MySQL - by Vince - 23.06.2014, 14:42
Re: Dead Connection MySQL - by .EnjatsRed. - 23.06.2014, 15:12

Forum Jump:


Users browsing this thread: 1 Guest(s)