error 040: duplicate "case" label (value 5) |
case ClassTrainDriver
{
Index = random(sizeof(ASpawnLocationsRoadWorker));
x = ASpawnLocationsRoadWorker[Index][SpawnX]; // Get the X-position for the spawnlocation
y = ASpawnLocationsRoadWorker[Index][SpawnY]; // Get the Y-position for the spawnlocation
z = ASpawnLocationsRoadWorker[Index][SpawnZ]; // Get the Z-position for the spawnlocation
Angle = ASpawnLocationsRoadWorker[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
format(Msg, 128, "{00FF00}Player {FFFF00}%s{00FF00} joined {FFFF00}Roadworker class", Name);
}
case ClassTrainDriver:
{
Index = random(sizeof(ASpawnLocationsTrainDriver));
x = ASpawnLocationsTrainDriver[Index][SpawnX]; // Get the X-position for the spawnlocation
y = ASpawnLocationsTrainDriver[Index][SpawnY]; // Get the Y-position for the spawnlocation
z = ASpawnLocationsTrainDriver[Index][SpawnZ]; // Get the Z-position for the spawnlocation
Angle = ASpawnLocationsTrainDriver[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
format(Msg, 128, "{00FF00}Player {FFFF00}%s{00FF00} joined {FFFF00}Train Driver class", Name);
}
new rnd = random(8);
switch(rnd){
case 0, 1, 2:
print("caso 0, 1 o 2");
case 3 .. 6:
print("caso 3-6");
case 7, 8://valor repetido (8)
print("caso 7 u 8");
case 8://valor repetido
print("caso 8");
}
significa que tenes el valor 5 en 2 casos diferentes.
Ej: pawn Код:
|