29.05.2015, 14:49
Hello, heres my code:
But I got this error
What did I do wrong?
Код HTML:
public OnPlayerRequestClass(playerid, classid) { switch(classid) { case 0: { gTeam[playerid] = TEAM_USA; GameTextForPlayer(playerid, "~b~USA", 5000, 5); SetPlayerPos(playerid, 1522.6503,-806.6635,72.1700); SetPlayerFacingAngle(playerid, 8298); SetPlayerCameraPos(playerid, 1514.0861,-806.9355,72.0768); SetPlayerCameraLookAt(playerid, 1522.6503,-806.6635,72.1700); } case 1: { gTeam[playerid] = TEAM_RUSS; GameTextForPlayer(playerid, "~r~RUSSIAN", 5000, 5); SetPlayerPos(playerid, 1279.3276,-778.4965,95.9663); SetPlayerFacingAngle(playerid,8298); SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665); SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663); } case 2: { gTeam[playerid] = TEAM_ARAB; GameTextForPlayer(playerid, "~y~ARAB", 5000, 5); SetPlayerPos(playerid, 1522.6503,-806.6635,72.1700); SetPlayerFacingAngle(playerid, 8298); SetPlayerCameraPos(playerid, 1514.0861,-806.9355,72.0768); SetPlayerCameraLookAt(playerid, 1522.6503,-806.6635,72.1700); } case 3: { gTeam[playerid] = TEAM_EURO; GameTextForPlayer(playerid, "~g~EUROPE", 5000, 5); SetPlayerPos(playerid, 1279.3276,-778.4965,95.9663); SetPlayerFacingAngle(playerid,8298); SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665); SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663); } case 4: { gTeam[playerid] = TEAM_REBELS; GameTextForPlayer(playerid, "~br~REBELS", 5000, 5); SetPlayerPos(playerid, 1279.3276,-778.4965,95.9663); SetPlayerFacingAngle(playerid,8298); SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665); SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663); } case 5: { gTeam[playerid] = TEAM_ASIA; GameTextForPlayer(playerid, "~y~ASIAN", 5000, 5); SetPlayerPos(playerid, 1522.6503,-806.6635,72.1700); SetPlayerFacingAngle(playerid, 8298); SetPlayerCameraPos(playerid, 1514.0861,-806.9355,72.0768); SetPlayerCameraLookAt(playerid, 1522.6503,-806.6635,72.1700); } case 6: { gTeam[playerid] = TEAM_NONE; GameTextForPlayer(playerid, "~w~MERC", 5000, 5); SetPlayerPos(playerid, 1279.3276,-778.4965,95.9663); SetPlayerFacingAngle(playerid,8298); SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665); SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663); } ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Soldier Class\nSniper Class\nEngineer Class\nJet-Trooper Class\nPilot Class\nSpy Class", "Choose","");//this is the class dialog, you can change it if you want but dont forget to define the class also } return 1; }
Код HTML:
C:\Users\Charalambos\Desktop\dddd.pwn(525) : error 002: only a single statement (or expression) can follow each "case" C:\Users\Charalambos\Desktop\dddd.pwn(525) : warning 215: expression has no effect C:\Users\Charalambos\Desktop\dddd.pwn(527) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.