/UNBANNAME error with Y_ini
#1

im trying to make that when i do /unbanname the "Banned" is set to 0 and player can join , here's the script
Код:
CMD:unbanname(playerid,params[])
{
	if(!IsPlayerAnAdmin(playerid,6))return SendClientMessage(playerid,0xFF0000FF,"You're not allowed to use this command!");
	new Name[20],string[128],string3[128];
	if(sscanf(params,"s",Name))return SendClientMessage(playerid,COL_GREEN,"/unbanname [name]");
	format(string,sizeof(string),"You have unbanned %s.",Name);
	for(new i=0;i<GetMaxPlayers();i++)
	{
	if(IsPlayerConnected(i))
	{
	if(IsPlayerAnAdmin(i,1))
	{
    format(string3,sizeof(string3),"A: %s [LEVEL %i] used the UNBANNAME command.",PlayerName(playerid),GetPVarInt(playerid,"Admin"));
	SendClientMessage(i,COLOR_ORANGE,string3);
	}
	}
	}
 	SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
 	format(Name,sizeof(Name),"/Accounts/%s.txt",Name);
 	INI_WriteInt(File,"Banned",0);
 	return 1;
}
error: undefined symbol "File"
Reply
#2

After the format:
pawn Код:
new INI:File = INI_Open(Name);
And increase the number of cells the variable has.

pawn Код:
new Name[MAX_PLAYER_NAME + 15]
Reply
#3

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
After the format:
pawn Код:
new INI:File = INI_Open(Name);
And increase the number of cells the variable has.

pawn Код:
new Name[MAX_PLAYER_NAME + 15]
Thanks it worked , +Rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)