Must be assigned to an array, help!
#1

Hi! I need help with this:
Код:
CMD:specijalnoime(playerid, params[], help)
{
	JeliLogovan
	if(PlayerInfo[playerid][pAdmin] < 6) return NematePravo
	if(AdminDuznost[playerid] == 0) return NisteAD
	new id, ime[MAX_PLAYER_NAME], msg1[128], msg2[128], msg3[128];
	if(sscanf(params, "us[16]", id, ime)) return SCM, "[ E ] | {FFFFFF}Koristenje: /promjeniime {ffdf2d}[ID] [IME].");
	else
	{
		if(id == INVALID_PLAYER_ID) return NemaIgraca
		PlayerInfo[id][pSIme] = ime;
		SetPlayerName(id, ime);
		format(msg1, sizeof(msg1), "[ E ] | {FFFFFF}Igracu {ffdf2d}%s {ffffff}ste postavili specijalno ime na {ffdf2d}%s.", ImeIgraca(id), ime);
		format(msg2, sizeof(msg2), "[ E ] | {FFFFFF}Vlasnik {ffdf2d}%s {ffffff}vam je postavio specijalno ime na {ffdf2d}%s.", ImeIgraca(playerid), ime);	
		format(msg3, sizeof(msg3), "[ E ] | {FFFFFF}Svaki put kada ulazite na server, koristite ime {ffdf2d}%s, {ffffff}server ce vam automatski postaviti specijalno ime.", ImeIgraca(id));
		SendClientMessage(playerid, ZUTA, msg1);
		SendClientMessage(id, ZUTA, msg2);
		SendClientMessage(id, ZUTA, msg3);
	}
	return 1;
}
I get an error at the line "PlayerInfo[id][pSIme] = ime;" saying must be assigned to an array.
Any help will be appreciated.
Reply
#2

can you show meyour enum
Reply
#3

Код:
enum pInfo
{
    pSifra,
    pNovac,
    pAdmin,
    pSmrti,
    pUbistva,
    pBankaNovac,
    pKikovan,
	pPosao,
	pDroga,
	pPrivatnoImanje,
	pLevel,
	pSIme
}
new PlayerInfo[MAX_PLAYERS][pInfo];
EDIT: I just added max_player_name to pSIme, and it gives me no errors, i think it works
2nd EDIT: It works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)