03.06.2011, 17:45
(
Последний раз редактировалось bartje01; 03.06.2011 в 22:55.
Причина: a
)
Hey everyone. Ive got a new problem. Im working on a faction system and I try to make a /createfaction command.
It gives one error. I dont know if this is right what Im doing.
My command:
And maybe you need this as well:
my error code:
On this line:
Please help.
It gives one error. I dont know if this is right what Im doing.
My command:
pawn Код:
COMMAND:createfaction(playerid,params[])
{
new string[80],file[40],name;
if(PlayerInfo[playerid][pAdminLevel] <2) return SendClientMessage(playerid,COLOR_RED,"You're not allowed to do this");
if(sscanf(params,"s",name)) return SendClientMessage(playerid,COLOR_GREY,"USAGE:/createfaction [faction name]");
format(file,sizeof(file),"%s.ini",name);
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file, "Name",FactionInfo[fname] = name);
format(string,sizeof(string),"Succesfully created faction: %s",name);
SendClientMessage(playerid,COLOR_YELLOW,string);
}
else
{
SendClientMessage(playerid, COLOR_RED, "This faction already exists");
}
return 1;
}
pawn Код:
enum fInfo
{
fowner,
fname,
ftype,
}
new FactionInfo[MAX_PLAYERS][pInfo];
Код:
C:\Users\Bart\Desktop\SampScripting\gamemodes\Sunlight.pwn(454) : error 033: array must be indexed (variable "FactionInfo") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
pawn Код:
dini_IntSet(file, "Name",FactionInfo[fname] = name);