error 040: duplicate "case" label (value 29)
#1

pawn Код:
error 040: duplicate "case" label (value 29)
Код:
case 29 .. 100:
Reply
#2

We are meant to guess your code?
Reply
#3

I gave u the code -.- case 29 .. 100:

If u want all of it it's
Код:
public OnPlayerSpawn(playerid)
{
IsPlayerPolice[playerid] = 0;
switch(GetPlayerSkin(playerid))
     {
         case 105 .. 107:
         {
              SetPlayerTeam(playerid, TEAM_GROVE);
              SetPlayerColor(playerid, COL_GREEN);
              }
              case 102 .. 104:
              {
                  SetPlayerTeam(playerid, TEAM_BALLAS);
                  SetPlayerColor(playerid, COL_PURPLE);
              }
              case 7 .. 73:
              {
				  SetPlayerColor(playerid, COLOR_WHITE);
			  }
              case 108 .. 110:
              {
                  SetPlayerTeam(playerid, TEAM_VAGOS);
                  SetPlayerColor(playerid, COL_YELLOW);
              }
              case 280 .. 285:
              {
                  SetPlayerTeam(playerid, TEAM_POLICE);
                  SetPlayerColor(playerid, COLOR_BLUE);
                  IsPlayerPolice[playerid] = 1;
              }
              case 29 .. 100:
              {
                  SetPlayerTeam(playerid, TEAM_DRUGDEALERS);
                  SetPlayerColor(playerid, COL_RED);
              }
              case 114 .. 116:
              {
                  SetPlayerTeam(playerid, TEAM_AZTECAS);
                  SetPlayerColor(playerid, COL_LIGHTBLUE);
              }
      }
return 1;
}
Reply
#4

Make them case 1;
case 2;
Not case 29 .. 100; etc...
Reply
#5

Lol, But the numbers are the skins -.-
Reply
#6

Well define them as PlayerSkins(playerid, #VALUE);
Reply
#7

These two cross
pawn Код:
case 7 .. 73:
{
    SetPlayerColor(playerid, COLOR_WHITE);
}
case 29 .. 100:
{
    SetPlayerTeam(playerid, TEAM_DRUGDEALERS);
    SetPlayerColor(playerid, COL_RED);
}
Reply
#8

you mean new PlayerSkins(playerid, bla bla ?
Reply
#9

Yes and two of them cross as Nero said!
Код:
case 7 .. 73:
{
    SetPlayerColor(playerid, COLOR_WHITE);
}
case 29 .. 100:
{
    SetPlayerTeam(playerid, TEAM_DRUGDEALERS);
    SetPlayerColor(playerid, COL_RED);
}
Reply
#10

Like that?
Код:
public OnPlayerSpawn(playerid)
{
IsPlayerPolice[playerid] = 0;
switch(GetPlayerSkin(playerid))
     {
         case 105 .. 107:
         {
              SetPlayerTeam(playerid, TEAM_GROVE);
              SetPlayerColor(playerid, COL_GREEN);
              }
              case 102 .. 104:
              {
                  SetPlayerTeam(playerid, TEAM_BALLAS);
                  SetPlayerColor(playerid, COL_PURPLE);
              }
              case 7 .. 73:
              {
				  SetPlayerColor(playerid, COLOR_WHITE);
			  }
              case 108 .. 110:
              {
                  SetPlayerTeam(playerid, TEAM_VAGOS);
                  SetPlayerColor(playerid, COL_YELLOW);
              }
              case 7 .. 73:
              {
                SetPlayerColor(playerid, COLOR_WHITE);
              }
              case 29 .. 100:
              {
                SetPlayerTeam(playerid, TEAM_DRUGDEALERS);
                SetPlayerColor(playerid, COL_RED);
              }
              case 114 .. 116:
              {
                  SetPlayerTeam(playerid, TEAM_AZTECAS);
                  SetPlayerColor(playerid, COL_LIGHTBLUE);
              }
      }
return 1;
}
cause if yes i get that
pawn Код:
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(256) : error 040: duplicate "case" label (value 7)
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(260) : error 040: duplicate "case" label (value 29)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)