Jump to content
  • 0

Eroare in pawno


FloriNNN

Question

Salut  am inceput si eu recent un GM de la 0 si nu imi pot da seama cum sa rezolv acea eroare mai exact error 002: only a single statement (or expression) can follow each "case"

Eroarea se afla la linia asta: else SendClientMessage(playerid, COLOR_WHITE, "Nu esti in jurul unui job");

cod:

CMD:getjob(playerid, params[]){
    if(PlayerJob[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Ai deja un job!");
    new string[256];
    switch(PlayerJob[playerid]){
    case 0: {
    if(IsPlayerInRangeOfPoint(playerid, 5.0, 1764.96191, -2050.68042, 14.96930)){
        PlayerJob[playerid] = 1;
        format(string, sizeof(string), "Job-ul tau este acum %s.Foloseste comanda /startwork pentru a munci!", JOB_NAME1);
        SendClientMessage(playerid, COLOR_CYAN, string);
        }
    }
    case 1: {
    if(IsPlayerInRangeOfPoint(playerid, 5.0, 854.8568,-605.1971,18.4219)){
        PlayerJob[playerid] = 1;
        format(string, sizeof(string), "Job-ul tau este acum %s.Foloseste comanda /startwork pentru a munci!", JOB_NAME2);
        SendClientMessage(playerid, COLOR_CYAN, string);
        }
    }
    else SendClientMessage(playerid, COLOR_WHITE, "Nu esti in jurul unui job");
    return 1;
}

Edited by FloriNNN
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

CMD:getjob(playerid, params[]){
    if(PlayerJob[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Ai deja un job!");
    new string[256];
    switch(PlayerJob[playerid]){
        case 0: {
            if(IsPlayerInRangeOfPoint(playerid, 5.0, 1764.96191, -2050.68042, 14.96930)){
                PlayerJob[playerid] = 1;
                format(string, sizeof(string), "Job-ul tau este acum %s.Foloseste comanda /startwork pentru a munci!", JOB_NAME1);
                
            }
        }
        case 1: {
            if(IsPlayerInRangeOfPoint(playerid, 5.0, 854.8568,-605.1971,18.4219)){
                PlayerJob[playerid] = 1;
                format(string, sizeof(string), "Job-ul tau este acum %s.Foloseste comanda /startwork pentru a munci!", JOB_NAME2);
                
            }
        }
        default: return SendClientMessage(playerid, COLOR_WHITE, "Nu esti in jurul unui job");
    }
    SendClientMessage(playerid, COLOR_CYAN, string);
    return 1;
}

incearca asa ms pa da like sau nu mai dormi diseara :))

  • Upvote 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.