Problem with an unban cmd
#1

This is the cmd:

Код:
CMD:aunban(playerid,params[])
{
	if(pInfo[playerid][Admin] >= 70)
	{
		new nom[24],string[128];
		if(sscanf(params,"s[24]", nom)) return SendClientMessage(playerid, Gris, "/aunban [Nom_Prйnom du joueur]");
		format(string, sizeof(string), "SELECT * FROM `joueurs` WHERE `Bannis` = '1' AND `Username` = '%s' LIMIT 1", nom);
		mysql_query(string);
		mysql_store_result();
		if(!mysql_num_rows()) return mysql_free_result();
		SendClientMessage(playerid, Rouge,"Ce joueur n'est pas bannis !");
		mysql_free_result();
		mysql_format(mysql,string,sizeof(string),"UPDATE `joueurs` SET `Bannis` = '0' WHERE `Username` = '%e'", nom);
		mysql_tquery(mysql,string,"","");
		GetPlayerName(playerid, joueuremetteur, sizeof(joueuremetteur));
		GetPlayerName(nom, joueurdestinataire, sizeof(joueurdestinataire));
		format(string, sizeof(string), "%s a unban %s.", joueuremetteur, joueurdestinataire);
		ChannelAdmin(Rouge, string);
		return 1;
	}
	return SendClientMessage(playerid, Rouge,"La commande entrйe est inconnue !");
}
But I got errors:

Код:
mysql_query(string);
 error 035: argument type mismatch (argument 1)
Код:
mysql_store_result();
warning 209: function "mysql_free_result" should return a value
Reply


Messages In This Thread
Problem with an unban cmd - by anou1 - 08.02.2014, 16:05
Re: Problem with an unban cmd - by CuervO - 08.02.2014, 16:26
Re: Problem with an unban cmd - by anou1 - 08.02.2014, 16:35
Re: Problem with an unban cmd - by CuervO - 08.02.2014, 16:39
Re: Problem with an unban cmd - by anou1 - 08.02.2014, 17:26
Re: Problem with an unban cmd - by CuervO - 08.02.2014, 17:41
Re: Problem with an unban cmd - by anou1 - 08.02.2014, 18:28
Re: Problem with an unban cmd - by CuervO - 08.02.2014, 20:05
Re: Problem with an unban cmd - by anou1 - 08.02.2014, 20:10

Forum Jump:


Users browsing this thread: 1 Guest(s)