Posts: 1,018
Threads: 320
Joined: Jul 2010
Hello. I made myself command checkoffplayer and I store player info banned into a variable abanned[1] which I load with ini_fileparse and I want to make
if(abanned[1] == 1) so if banned variable hold the banned pinfo so I was thinking if abanned is 1 then it send message player is banned but the problem is that it gives me array size must be indexed abanned
Posts: 511
Threads: 13
Joined: Jun 2012
Reputation:
0
Show us the code that gives that error.
Posts: 1,018
Threads: 320
Joined: Jul 2010
I give you the code and the line where it's error
if(abanned[0] == 1) //this is that code
Posts: 1,018
Threads: 320
Joined: Jul 2010
new abanned[1][MAX_PLAYER_NAME];
then public Banned
public Banned(playerid,name[],value[])
{
INI_String("PlayerBanned",abanned[0],MAX_PLAYER_NAME); I want from here in commad get 1 or 0 from abanned beacuse that variable hold playerbanned which is for pinfo where it's 0 or 1 and that I need in offcheckplayer
return 1;
}
Posts: 1,018
Threads: 320
Joined: Jul 2010
It won't work that way look my other code which I get from offline player like level and admin level
this code is in off comand check
pawn Код:
format(acc,128,PATH,name);
INI_ParseFile(acc,"OffLineData",.bExtra = true, .extra = playerid);
format(string,sizeof(string),"Level[%s] AdminLV[%s],offdata[0],offdata[1]);
SendClientMessage(playerid,COLOR_YELLOW,string);
pawn Код:
public OffLineData(playerid,name[],value[])
{
INI_String("Level",offdata[0],MAX_PLAYER_NAME);
INI_String("AdminLevel",offdata[1],MAX_PLAYER_NAME);
}