Error 033
#1

I have an error 033: array must be indexed (variable "fightstyle") problem.
Код:
new fightstyle[MAX_PLAYERS];
Im using Dini to save stats.
Код:
public OnPlayerConnect(playerid)
{
  	new file[MAX_PLAYER_NAME+5], name[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, name, sizeof(name));
  	format(file, sizeof(file), "N.N.GangWar/users/%s.txt", name);
 	 dini_Int(file,"fightstyle");
 	 fightstyle[playerid] =dini_Int(file,"fightstyle");

	if(!fexist(file))
  {
   dini_Create(file);
   fightstyle[playerid] = 0;
  }
	return 1;
}
Than...
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
		if(strcmp(cmdtext, "/lol", true) == 0)
	{
        fightstyle = 3;
		            return 1;
		}
	return 1;
	}
Somewhere in script i have if fightstyle = 0 it does that and that and blah blah... whatever
And at end to save fightstyles number...
Well i get that error in line "fightstyle = 3;"
No idea why.
EDIT: there is no difference if i change "fightstyle = 3;" to "fightstyle == 3;" not at error problem
Reply


Messages In This Thread
Error 033 - by nejc001 - 03.10.2010, 13:14
Re: Error 033 - by Conroy - 03.10.2010, 14:00
Re: Error 033 - by nejc001 - 03.10.2010, 14:33

Forum Jump:


Users browsing this thread: 1 Guest(s)