HELP MEEEEE [DONT IGNJOR]
#1

Код:
 public OnPlayerRequestClass(playerid, classid)
{
new gTeam[MAX_PLAYERS],
gPlayerClass[playerid];

  switch (classid)
   {

	   case 0:

	    {
      gTeam[playerid] = TEAM_Party;
	       GameTextForPlayer(playerid, "~g~Party", 1000, 6);

	    }
	   case 1:

	    {
      gTeam[playerid] = TEAM_Guard;
      GameTextForPlayer(playerid, "~r~Guard", 1000, 6);
  }
Код:
C:\Users\Jo\Desktop\samp server\gamemodes\test.pwn(266) : error 008: must be a constant expression; assumed zero
C:\Users\Jo\Desktop\samp server\gamemodes\test.pwn(266) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Jo\Desktop\samp server\gamemodes\test.pwn(266) : error 036: empty statement
C:\Users\Jo\Desktop\samp server\gamemodes\test.pwn(266) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
anyone know how to fix problem?


266 is gPlayerClass[playerid];
Reply
#2

Quote:
Originally Posted by sanrock
Посмотреть сообщение
Код:
 public OnPlayerRequestClass(playerid, classid)
{
new gTeam[MAX_PLAYERS],
gPlayerClass[playerid];

  switch (classid)
   {

	   case 0:

	    {
      gTeam[playerid] = TEAM_Party;
	       GameTextForPlayer(playerid, "~g~Party", 1000, 6);

	    }
	   case 1:

	    {
      gTeam[playerid] = TEAM_Guard;
      GameTextForPlayer(playerid, "~r~Guard", 1000, 6);
  }
Код:
C:\Users\Jo\Desktop\samp server\gamemodes\test.pwn(266) : error 008: must be a constant expression; assumed zero
C:\Users\Jo\Desktop\samp server\gamemodes\test.pwn(266) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Jo\Desktop\samp server\gamemodes\test.pwn(266) : error 036: empty statement
C:\Users\Jo\Desktop\samp server\gamemodes\test.pwn(266) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
anyone know how to fix problem?


266 is gPlayerClass[playerid];
The problem comes from here:
Код:
new gTeam[MAX_PLAYERS],
gPlayerClass[playerid];
Change this to:
PHP код:
new gTeam[MAX_PLAYERS],
gPlayerClass[MAX_PLAYERS]; 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)