PDA

View Full Version : Must be assigned to an array


Shuffler
11/10/2011, 05:52 PM
CMD:factionname(playerid, params[])
{
new string[128];
if(PVar[playerid][pFaction] == 0)
{
return SendClientMessage(playerid, COLOR_RED, "[ERROR:] You are not in a faction");
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USE: /factionname [name]");
format(string, sizeof(string), "[INFO:] You have set factions name to %s", params);
SendClientMessage(playerid, COLOR_GREEN, string);
new factionid;
factionid = PVar[playerid][pFaction];
return FVar[factionid][fName] = params; // Says that this must be assigned to an array
}

Any help?

IstuntmanI
11/10/2011, 06:15 PM
fName must to be a string, if it is, try this:
format( FVar[ factionid ][ fName ], "%s", params );

Wesley221
11/10/2011, 07:46 PM
Is the 'fName' in the enum a string? If not: fName[50]
Should be in the enum like that