Error 033 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error 033 (
/showthread.php?tid=180935)
Error 033 -
nejc001 - 03.10.2010
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
Re: Error 033 -
Conroy - 03.10.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/lol", true) == 0) {
fightstyle[playerid] = 3;
return 1;
}
return 1;
}
Re: Error 033 -
nejc001 - 03.10.2010
yep,found it by myself -.-
ty anyway