30.10.2012, 14:08
Hi, I add classes to my ppc trucking gamemode.
But get 8 of errors 040.
What is the problem?
But get 8 of errors 040.
What is the problem?
case ClassTruckDriver: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Trucker\n", PlayerStatList); case ClassBusDriver: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Bus driver\n", PlayerStatList); case ClassPilot: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Pilot\n", PlayerStatList); case ClassPolice: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Police\n", PlayerStatList); case ClassMafia: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Mafia\n", PlayerStatList); case ClassCourier: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Courier\n", PlayerStatList); case ClassAssistance: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Assistance\n", PlayerStatList); case ClassPaperboy: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Paperboy\n", PlayerStatList); case ClassGarbageman: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Garbageman\n", PlayerStatList); case ClassFarmer: format(PlayerStatList, sizeof(PlayerStatList), "%s{FFFFFF}Class: {00FF00}Farmer\n", PlayerStatList); } // Set the missiontext based on the chosen class switch (APlayerData[playerid][PlayerClass]) { case ClassPaperboy: // Paperboy class { format(missiontext, sizeof(missiontext), Paperboy_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassPaperboy); // Set the playercolor (chatcolor for the player and color on the map) } case ClassGarbageman: // Garbageman class { format(missiontext, sizeof(missiontext), Garbageman_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassGarbageman); // Set the playercolor (chatcolor for the player and color on the map) } case ClassFarmer: // Farmer class { format(missiontext, sizeof(missiontext), Farmer_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassFarmer); // Set the playercolor (chatcolor for the player and color on the map) } } case ClassPaperboy: { Index = random(sizeof(ASpawnLocationsPaperboy)); x = ASpawnLocationsPaperboy[Index][SpawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsPaperboy[Index][SpawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsPaperboy[Index][SpawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsPaperboy[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, "{00FF00}Player {FFFF00}%s{00FF00} joined {FFFF00}Paperboy class", Name); } case ClassGarbageman: { Index = random(sizeof(ASpawnLocationsGarbageman)); x = ASpawnLocationsGarbageman[Index][SpawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsGarbageman[Index][SpawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsGarbageman[Index][SpawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsGarbageman[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, "{00FF00}Player {FFFF00}%s{00FF00} joined {FFFF00}Garbageman class", Name); } case ClassFarmer: { Index = random(sizeof(ASpawnLocationsFarmer)); x = ASpawnLocationsFarmer[Index][SpawnX]; // Get the X-position for the spawnlocation y = ASpawnLocationsFarmer[Index][SpawnY]; // Get the Y-position for the spawnlocation z = ASpawnLocationsFarmer[Index][SpawnZ]; // Get the Z-position for the spawnlocation Angle = ASpawnLocationsFarmer[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation format(Msg, 128, "{00FF00}Player {FFFF00}%s{00FF00} joined {FFFF00}Farmer class", Name); } } |
C:\Users\BenRoger\Desktop\Trucking\gamemodes\PPC_T rucking.pwn(520) : error 040: duplicate "case" label (value 6) C:\Users\BenRoger\Desktop\Trucking\gamemodes\PPC_T rucking(521) : error 040: duplicate "case" label (value 7) C:\Users\BenRoger\Desktop\Trucking\gamemodes\PPC_T rucking.pwn(703) : error 040: duplicate "case" label (value 6) C:\Users\BenRoger\Desktop\Trucking\gamemodes\PPC_T rucking.pwn(70 ![]() C:\Users\BenRoger\Desktop\Trucking\gamemodes\PPC_T rucking.pwn(713) : error 040: duplicate "case" label (value ![]() C:\Users\BenRoger\Desktop\Trucking\gamemodes\PPC_T rucking.pwn(1076) : error 040: duplicate "case" label (value 6) C:\Users\BenRoger\Desktop\Trucking\gamemodes\PPC_T rucking.pwn(1085) : error 040: duplicate "case" label (value 7) C:\Users\BenRoger\Desktop\Trucking\gamemodes\PPC_T rucking.pwn(1094) : error 040: duplicate "case" label (value ![]() Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors. |