Must be assigned to an array
#1

pawn Код:
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?
Reply
#2

fName must to be a string, if it is, try this:
Код:
format( FVar[ factionid ][ fName ], "%s", params );
Reply
#3

Is the 'fName' in the enum a string? If not:
pawn Код:
fName[50]
Should be in the enum like that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)