Pawno error 006
#1

Код:
CMD:set(playerid, params[])
{
	new string[128], id, option[3], targetid, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
	new Input[64];
	GetPlayerName(playerid, sendername,sizeof(sendername));
	GetPlayerName(id, name,sizeof(name));
	if(PlayerInfo[playerid][pAdmin] > 1) return SCM(playerid, COLOR_GREY, "unauthorized");
	{
	    if(sscanf(params, "uss", id, option, Input)) return SCM(playerid, COLOR_GREY, "Usage: /set [playerid] [1 = Rank | 2 = Agency] [Text]");
	    {
			if(!strcmp(option, "1", true))
			{
			    format(string,sizeof(string),"Admin %s set your rank to %s.", sendername, Input);
			    SendClientMessage(id, COLOR_GREEN, string);
			    PlayerInfo[id][pRank] = Input;
			}
			if(!strcmp(option, "2", true))
			{
			    format(string,sizeof(string),"Admin %s set your agency to %s.", sendername, Input);
			    SendClientMessage(id, COLOR_GREEN, string);
			    PlayerInfo[id][pAgency] = Input;
			}
		}
	}
	return 1;
}
I keep getting the error 006:

Код:
C:\Users\Scoot\Desktop\Roleplay\gamemodes\rp.pwn(4322) : error 006: must be assigned to an array
C:\Users\Scoot\Desktop\Roleplay\gamemodes\rp.pwn(4328) : error 006: must be assigned to an array

Line 4322:
Код:
PlayerInfo[id][pRank] = Input;
Line 4328:
Код:
PlayerInfo[id][pAgency] = Input;
Reply
#2

Delete this please
Reply
#3

Still the same errors
Reply
#4

pawn Код:
CMD:set(playerid, params[])
{
    new string[128], id, option[3], targetid, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
    new Input[64];
    GetPlayerName(playerid, sendername,sizeof(sendername));
    GetPlayerName(id, name,sizeof(name));
    if(PlayerInfo[playerid][pAdmin] > 1) return SCM(playerid, COLOR_GREY, "unauthorized");
    {
        if(sscanf(params, "uss", id, option, Input)) return SCM(playerid, COLOR_GREY, "Usage: /set [playerid] [1 = Rank | 2 = Agency] [Text]");
        {
            if(!strcmp(option, "1", true))
            {
                format(string,sizeof(string),"Admin %s set your rank to %s.", sendername, Input);
                SendClientMessage(id, COLOR_GREEN, string);
                PlayerInfo[id][pRank] = option;
            }
            if(!strcmp(option, "2", true))
            {
                format(string,sizeof(string),"Admin %s set your agency to %s.", sendername, Input);
                SendClientMessage(id, COLOR_GREEN, string);
                PlayerInfo[id][pAgency] = option;
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)