case 0: { GameTextForPlayer(playerid, \"~r~ LVPD~y~>~b~Police\", 2000, 6); } } switch(classid) {
c:\\GERGO BIRODALMA\\SA-MP MODDING\\gamemodes\\RCM.pwn(384) : error 014: invalid statement; not in switchc:\\GERGO\\SA-MP MODDING\\gamemodes\\RCM.pwn(384) : warning 215: expression has no effectc:\\GERGO\\SA-MP MODDING\\gamemodes\\RCM.pwn(384) : error 001: expected token: \";\", but found \":\"c:\\GERGO\\SA-MP MODDING\\gamemodes\\RCM.pwn(384) : error 029: invalid expression, assumed zeroc:\\GERGO\\SA-MP MODDING\\gamemodes\\RCM.pwn(384) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Errors.
case 0: { GameTextForPlayer(playerid, \"~r~ LVPD~y~>~b~Police\", 2000, 6); } }
case 0: { GameTextForPlayer(playerid, \"~r~ LVPD~y~>~b~Police\", 2000, 6); } switch(classid) { case 4: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 5: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 6: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 7: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 8: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 9: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 10: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 11: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 12: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 13: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 14: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 15: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 16: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 17: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 18: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 19: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 20: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 21: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 22: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 23: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { }
public OnPlayerRequestClass(playerid, classid){ new SkinID = GetPlayerSkin(playerid); if(SkinID == 280 || SkinID == 281 || SkinID == 282 || SkinID == 284) { if(IsPlayerLAdmin(playerid) == 0) { GameTextForPlayer(playerid, \"~r~Csak Adminoknak!!\", 750, 3); return 1; }} case 0: { GameTextForPlayer(playerid, \"~r~ LVPD~y~>~b~Police\", 2000, 6); } switch(classid) { case 4: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 5: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 6: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 7: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 8: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 9: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 10: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 11: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 12: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 13: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 14: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 15: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 16: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 17: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 18: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 19: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 20: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 21: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 22: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { case 23: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } switch(classid) { }
case 0: { GameTextForPlayer(playerid, \"~r~ LVPD~y~>~b~Police\", 2000, 6);
public OnPlayerRequestClass(playerid, classid){ new SkinID = GetPlayerSkin(playerid); if(SkinID == 280 || SkinID == 281 || SkinID == 282 || SkinID == 284) { if(IsPlayerAdmin(playerid) == 0) { GameTextForPlayer(playerid, \"~r~Csak Adminoknak!!\", 750, 3); }}switch(classid) { case 0: { GameTextForPlayer(playerid, \"~r~ LVPD~y~>~b~Police\", 2000, 6); } case 1: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 2: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 3: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 4: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 5: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 6: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 7: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 8: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 9: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 10: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 11: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 12: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 13: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 14: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 15: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 16: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 17: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 18: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 19: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 20: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } return 1; }
Megcsináltam neked. Remélem így képzelted el.A lényeg, hogy a switch-el több elágazást is lehet csinálni, és te nem használtad ki ezt a lehetoséget. Íme: public OnPlayerRequestClass(playerid, classid){ new SkinID = GetPlayerSkin(playerid); if(SkinID == 280 || SkinID == 281 || SkinID == 282 || SkinID == 284) { if(IsPlayerAdmin(playerid) == 0) { GameTextForPlayer(playerid, \"~r~Csak Adminoknak!!\", 750, 3); }}switch(classid) { case 0: { GameTextForPlayer(playerid, \"~r~ LVPD~y~>~b~Police\", 2000, 6); } case 1: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 2: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 3: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 4: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 5: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 6: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 7: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 8: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 9: { GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 10: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 11: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 12: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 13: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 14: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 15: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 16: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 17: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 18: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 19: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } case 20: {GameTextForPlayer(playerid,\"~b~CIVIL\",2000,6); } } return 1; }
SetPlayerPos(playerid, 2029.4147,1526.1724,10.8203);SetPlayerCameraPos(playerid, 2029.5216,1523.9297,10.8203);SetPlayerCameraLookAt(playerid, 2029.4147,1526.1724,10.8203);
c:\\GERGO BIRODALMA\\SA-MP MODDING\\gamemodes\\RCM.pwn(456) : error 021: symbol already defined: \"SetPlayerPos\"c:\\GERGO BIRODALMA\\SA-MP MODDING\\gamemodes\\RCM.pwn(461) : error 010: invalid function or declarationPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase