Problem with an unban cmd
#5

I tried to do this:

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


https://sampwiki.blast.hk/wiki/MySQL/R33#cache_delete


I don't understand what's wrong with my cmd.

Could you please tell me how to correct this, and how should I do ?

Thank you.
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: 7 Guest(s)