SA-MP Forums Archive
must be assigned to an array - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: must be assigned to an array (/showthread.php?tid=414767)



must be assigned to an array - dusk - 10.02.2013

So this is my error:
pawn Код:
C:\Users\Justas\Desktop\TestServer\gamemodes\freeroam1.pwn(47) : error 006: must be assigned to an array
And these are at the top of the script:
pawn Код:
enum pInfo{
   playername[MAX_PLAYER_NAME],
   PLAYER_REGGED,
   PLAYER_LOGGED,
   PLAYER_PASS,
   PLAYER_ADMIN
}

new PlayerInfo[MAX_PLAYERS][pInfo];
And the line 47:
pawn Код:
PlayerInfo[playerid][PLAYER_REGGED]=1;
And i just can fix the problem by myself,help please


Re: must be assigned to an array - LeBoyce - 10.02.2013

Hmm correct me if I'm wrong but the code you posted is right and working (tested). Maybe you're mistaken in the line? :/


Re: must be assigned to an array - dusk - 10.02.2013

nevermind,i changed the line to format(PlayerInfo[playerid][PLAYER_PASS],50,"%s",pass); and now it works.