Jump to content

Question

Posted

Salut am un gamemode mai exact a lui hpq123 si as vrea sa bag un job nou dar am o eroare,ma puteti ajuta?

        case 11: 
        {
            if(PlayerToPoint(7, playerid, 1968.6620, -2021.3400, 13.5469) {
                AddStaticVehicle(478, 1968.6620, -2021.3400, 13.5469, 0, 1, 1);
                CarAngle = 0;
                CP[playerid] = 157;
                new j = random(housess)+1;
                if(j == 0) j = 1;
                SetPlayerCheckpointEx(playerid, HouseInfo[j][hEntrancex],HouseInfo[j][hEntrancey],HouseInfo[j][hEntrancez], 7.0);
                format(string, sizeof(string), "Du-te la punctul ~r~~h~rosu~w~~h~ de pe mapa pentru a livra calorifere.~n~Distanta: ~y~%0.1fm.", GetPlayerDistanceFromPoint(playerid, HouseInfo[j][hEntrancex],HouseInfo[j][hEntrancey],HouseInfo[j][hEntrancez]));
                PlayerTextDrawSetString(playerid, InfosTD, string);
                defer HideTextdraw(playerid);
                PlayerTextDrawShow(playerid, InfosTD);                
            }
            else 
                 if(CP[playerid] != 0) return ShowPlayerDialog(playerid, DIALOG_CHECKPOINT, DIALOG_STYLE_MSGBOX, "Checkpoint", "Ai deja un checkpoint activ.\nDoresti sa-l anulezi? Daca da, apasa pe 'Ok'.", "Ok", "Exit");
                  CP[playerid] = 53;
                SCM(playerid, COLOR_GREY, "Nu esti la locul unde poti incepe munca. Ti-am pus un checkpoint, du-te la el!");
                SetPlayerCheckpointEx(playerid,-2667.0920,270.6440,3.9366, 7.0);
                return true;
            
        }


  Tot scriptul e din comanda YMCD:startwork

Si asta e eroarea:

C:\Users\Razvan\Desktop\HPQ123 samp\gamemodes\B-HOOD.pwn(23308) : error 014: invalid statement; not in switch
C:\Users\Razvan\Desktop\HPQ123 samp\gamemodes\B-HOOD.pwn(23308) : error 001: expected token: ";", but found ":"
C:\Users\Razvan\Desktop\HPQ123 samp\gamemodes\B-HOOD.pwn(23308) : error 029: invalid expression, assumed zero
C:\Users\Razvan\Desktop\HPQ123 samp\gamemodes\B-HOOD.pwn(23308) : fatal error 107: too many error messages on one line

 

7 answers to this question

Recommended Posts

  • 1
Posted (edited)

Nu ai pus codul unde trebuie. Orice "case" trebuie sa fie intr-un "switch".

Muta codul sub "switch(PlayerInfo[playerid][pJob]) {"

 

Edited by Akan

Discord:
! Akan !#6675

  • 0
Posted
Acum 12 minute, Akan a spus:

Nu ai pus codul unde trebuie. Orice "case" trebuie sa fie intr-un "switch".

Muta codul sub "switch(PlayerInfo[playerid][pJob]) {"

 

Nu cred ca e bine...

image.png.bd26cf09d2ae22445804f01e09d7467c.png

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.