[ERROR] Ayuda
#1

Hola alguien me puede decir como puedo arreglar este error que me tira mi GM:


pawn Код:
C:\*****\*****\*****\*****\*****\gamemodes\*****.pwn(9867) : error 002: only a single statement (or expression) can follow each "case"
y en la linea 9867 tengo:

pawn Код:
else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
Ayuda porfaaaa el que me Ayuda en esto le doy 1 reputaciуn!...
Reply
#2

Pasa una linea anterior y una despuйs de esa porq no le veo nada de malo.
Reply
#3

Esto es solo una parte del callblack
pawn Код:
case 44,45:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~r~]Admin]", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
                }
                else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
                SetPlayerInterior(playerid,3);
                SetPlayerClass(playerid, classid);
                SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
                SetPlayerFacingAngle(playerid,181.0);
                SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
                SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
                }
                else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
                //SetPlayerInterior(playerid,3);
                SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
                SetPlayerFacingAngle(playerid,286.25);
                SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
                SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
        }

    }
    return 1;
}
Cual es el error?
Reply
#4

El error es del case pero no lo puedo ver porq no lo pusiste xDDDDDD pasa el callback entero.
Reply
#5

El error es por que cierras el case y siges poniendo codigo

pawn Код:
case 44,45:
        {
                if(sentencia) // Cambia lo de sentencia por lo que debe ir ahi, supongo que tu sabes a que corresponde ese if
                {
                GameTextForPlayer(playerid, "~w~Equipo ~r~]Admin]", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
                } // Aquн el error, NO abriste el if correspondiente a "else if"
                else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
                SetPlayerInterior(playerid,3);
                SetPlayerClass(playerid, classid);
                SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
                SetPlayerFacingAngle(playerid,181.0);
                SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
                SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
                }
                else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
                //SetPlayerInterior(playerid,3);
                SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
                SetPlayerFacingAngle(playerid,286.25);
                SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
                SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
                }

    }
    return 1;
Cambia lo de sentencia por lo que debe ir ahi, supongo que tu sabes a que corresponde ese if
Reply
#6

Aquн esta el codigo completo:

pawn Код:
ClassSel_SetupCharSelection(playerid, classid)
{
    if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
    SetPlayerClass(playerid, classid);
    switch(classid)
    {
        case 0,3:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~g~Los Grove", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Loop_A",4.1,7,5,1,1,1);

                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 4,7:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~p~Los Ballas", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Left_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 8,10:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~b~Los Aztecas", 500000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Right_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 11,13:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~r~Los Nang", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Up_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 14,16:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~y~Los Vagos", 900000000, 3);

                ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 17,18:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~b~Policia (LSPD)", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_c",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 19,20:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~g~Agentes Especiales", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_a",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);

        }
        case 21,22:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~l~Mafia Italiana", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_d",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 23,25:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~r~Rebeldes", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Up_A",4.1,7,5,1,1,1);
        }
        case 26,28:
        {
                GameTextForPlayer(playerid, "~w~Equipo Los Yakuza", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_a",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 29,30:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~y~Militares", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_d",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 31,35:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~r~Terroristas", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Loop_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 36,37:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~y~Civiles", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Right_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 38,39:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~b~Stunters", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 40,41:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~p~Zombie", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_d",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 42,43:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~y~]V.I.P.]", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 44,45:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~r~]Admin]", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
                }
                else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
                SetPlayerInterior(playerid,3);
                SetPlayerClass(playerid, classid);
                SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
                SetPlayerFacingAngle(playerid,181.0);
                SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
                SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
                }
                else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
                //SetPlayerInterior(playerid,3);
                SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
                SetPlayerFacingAngle(playerid,286.25);
                SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
                SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
        }

    }
    return 1;
}
Reply
#7

pawn Код:
ClassSel_SetupCharSelection(playerid, classid)
{
    if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS)
    SetPlayerClass(playerid, classid);
    switch(classid)
    {
        case 0,3:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~g~Los Grove", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Loop_A",4.1,7,5,1,1,1);

                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 4,7:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~p~Los Ballas", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Left_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 8,10:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~b~Los Aztecas", 500000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Right_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 11,13:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~r~Los Nang", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Up_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 14,16:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~y~Los Vagos", 900000000, 3);

                ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 17,18:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~b~Policia (LSPD)", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_c",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 19,20:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~g~Agentes Especiales", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_a",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);

        }
        case 21,22:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~l~Mafia Italiana", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_d",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 23,25:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~r~Rebeldes", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Up_A",4.1,7,5,1,1,1);
        }
        case 26,28:
        {
                GameTextForPlayer(playerid, "~w~Equipo Los Yakuza", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_a",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 29,30:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~y~Militares", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_d",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 31,35:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~r~Terroristas", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Loop_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 36,37:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~y~Civiles", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","DAN_Right_A",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 38,39:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~b~Stunters", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 40,41:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~p~Zombie", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_d",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 42,43:
        {
                GameTextForPlayer(playerid, "~w~Equipo ~y~]V.I.P.]", 900000000, 3);
                ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
                //ApplyAnimation(playerid,"STRIP","strip_D",4.1,7,5,1,1,1);
        }
        case 44,45:
        {
            GameTextForPlayer(playerid, "~w~Equipo ~r~]Admin]", 900000000, 3);
            ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
            if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
                SetPlayerInterior(playerid,3);
                SetPlayerClass(playerid, classid);
                SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
                SetPlayerFacingAngle(playerid,181.0);
                SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
                SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
            }
            else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
                //SetPlayerInterior(playerid,3);
                SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
                SetPlayerFacingAngle(playerid,286.25);
                SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
                SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
            }
        }

    }
    return 1;
}
Reply
#8

Si lo pongo asн me sale 23 Errores.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)