Jump to content
  • 0

Problema compilare.


Question

Salut, am incercat sa fac un sistem de roll, dar cand compilez, imi apare exact asa: https://imgur.com/a/Bqh0MgI . Nu este vreo eroare, sau ceva, nu am dat scroll, am incercat sa compilez si cu pawno, nu cu Sublime, si exact aceeasi problema(doar ca la pawno, nici macar aia cu "Finished" nu apare). Am lasat sa se incarce, m-am gandit ca poate nu au aparut inca erorile, dar degeaba. Chestia asta se intampla dupa ce scriu ceva, daca sterg treaba cu roll, compileaza absolut normal. Ma puteti ajuta? Multumesc.

Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0
3 minutes ago, andy47 said:

Ti-am zis sa imi dai toata comanda, mie mi se pare ca ai omis o paranteza.

Poftim
 

CMD:roll(playerid, params[]) {
    if(PlayerInfo[playerid][pRollPoints] < 100 return SCM(playerid), -1, "Nu ai 100 Roll Points!");    
    
    PlayerInfo[playerid][pRollPints] = 0;
    Update(playerid, pRollPointsx);
    
    new rand = random(30), string[64];

    switch(rand) {
        case 0..15: {
            new amount = 100000 + random(400000);
            format(string, sizeof(string), "Ai castigat $%s.", FormatNumber(amount));
            SCM(playerid, COLOR_YELLOW, string);
            GivePlayerCash(playerid, amount);
        }
        case 16..20: {
            PlayerInfo[playerid][pLevel] ++;
            Update(playerid, pLevelx);
            format(string, sizeof(string), "Ai castigat 1x Level Up, acum ai level %d.", PlayerInfo[playerid][pLevel]);
            SCM(playerid, COLOR_YELLOW, string);
        }
        case 21..30: {
            new amount = 1 + random(5);
            PlayerInfo[playerid][pExp] += amount;
            Update(playerid, pRP);
            format(string, sizeof(string), "Ai castigat %d RP-uri.", amount);
            SCM(playerid, COLOR_YELLOW, string);
        }
    }
    return 1;
}

 

EDIT: Pe langa comanda creeata, am mai facut asta la public PayDay

if(PlayerInfo[pRollPoints] < 100) PlayerInfo[pRollPoints] += 20, Update(i, pRollPointsx);

                format(string, sizeof(string), "Roll Points %d/100", PlayerInfo[pRollPoints]);
                SCM(i, COLOR_YELLOW, string);

Edited by Albert Constantin
Link to post
Share on other sites
  • 0
CMD:roll(playerid, params[])
{
    if(PlayerInfo[playerid][pRollPoints] < 100) return SCM(playerid, -1, "Nu ai 100 Roll Points!");

    PlayerInfo[playerid][pRollPints] = 0;
    Update(playerid, pRollPointsx);

    new rand = random(30), string[64];

    switch(rand) {
        case 0..15: {
            new amount = 100000 + random(400000);
            format(string, sizeof(string), "Ai castigat $%s.", FormatNumber(amount));
            SCM(playerid, COLOR_YELLOW, string);
            GivePlayerCash(playerid, amount);
        }
        case 16..20: {
            PlayerInfo[playerid][pLevel] ++;
            Update(playerid, pLevelx);
            format(string, sizeof(string), "Ai castigat 1x Level Up, acum ai level %d.", PlayerInfo[playerid][pLevel]);
            SCM(playerid, COLOR_YELLOW, string);
        }
        case 21..30: {
            new amount = 1 + random(5);
            PlayerInfo[playerid][pExp] += amount;
            Update(playerid, pRP);
            format(string, sizeof(string), "Ai castigat %d RP-uri.", amount);
            SCM(playerid, COLOR_YELLOW, string);
        }
    }
    return 1;
}

 

Link to post
Share on other sites
  • 0
5 minutes ago, andy47 said:
CMD:roll(playerid, params[])
{
    if(PlayerInfo[playerid][pRollPoints] < 100) return SCM(playerid, -1, "Nu ai 100 Roll Points!");

    PlayerInfo[playerid][pRollPints] = 0;
    Update(playerid, pRollPointsx);

    new rand = random(30), string[64];

    switch(rand) {
        case 0..15: {
            new amount = 100000 + random(400000);
            format(string, sizeof(string), "Ai castigat $%s.", FormatNumber(amount));
            SCM(playerid, COLOR_YELLOW, string);
            GivePlayerCash(playerid, amount);
        }
        case 16..20: {
            PlayerInfo[playerid][pLevel] ++;
            Update(playerid, pLevelx);
            format(string, sizeof(string), "Ai castigat 1x Level Up, acum ai level %d.", PlayerInfo[playerid][pLevel]);
            SCM(playerid, COLOR_YELLOW, string);
        }
        case 21..30: {
            new amount = 1 + random(5);
            PlayerInfo[playerid][pExp] += amount;
            Update(playerid, pRP);
            format(string, sizeof(string), "Ai castigat %d RP-uri.", amount);
            SCM(playerid, COLOR_YELLOW, string);
        }
    }
    return 1;
}

 

Gata fram, merge absolut perfect. Multumesc! Care era problema, te rog, in caz ca mi se mai intampla, sa stiu s-o rezolv singur. Multumesc mult de ajutor!

Link to post
Share on other sites
  • 0

Acum dadeam edit. Ai omis unele paranteze si vezi codul care l-ai mai adaugat e gresit.

if(PlayerInfo[pRollPoints] < 100) PlayerInfo[pRollPoints] += 20, Update(i, pRollPointsx);

format(string, sizeof(string), "Roll Points %d/100", PlayerInfo[pRollPoints]);
SCM(i, COLOR_YELLOW, string);
                                 
                                 
if(PlayerInfo[playerid][pRollPoints] < 100) 
{
	PlayerInfo[playerid][pRollPoints] += 20;
	Update(i, pRollPointsx);
    format(string, sizeof(string), "Roll Points %d/100", PlayerInfo[playerid][pRollPoints]);
    SCM(i, COLOR_YELLOW, string);
}         

 

Link to post
Share on other sites
  • 0

Mie mi-a compilat bine, doar ca gresisem eu anumite lucruri, pusesem "pRollPints", sau ceva de genu', in loc de Points, din graba, cand scriam la tastatura, si nu m-am uitat ce am scris, imi dadea "simbol nedefinit, dar am reparat, si la un moment dat, pusesem 2 paranteze una sub alta, ce nu-si aveau rosul, si aia era una dintre erorile ce mi le dadea dupa ce am bagat comanda de la tine, dar am sters una, si mi-a compilat perfect. Nedumerirea mea e ca de ce la comanda de la tine mi-a dat erori (pe care ulterior le-am rezolvat), si la mine nici erori, nici compilare reusita :D

Link to post
Share on other sites
  • 0
if(PlayerInfo[playerid][pRollPoints] < 100 return SCM(playerid), -1, "Nu ai 100 Roll Points!");  

Tu asa aveai scrisa linia asta, uitate cum am scris-o eu si trage singur concluzile. 😂 Fi mai atent! T/C!

Edited by andy47
Link to post
Share on other sites
  • 0
21 minutes ago, andy47 said:
if(PlayerInfo[playerid][pRollPoints] < 100 return SCM(playerid), -1, "Nu ai 100 Roll Points!");  

Tu asa aveai scrisa linia asta, uitate cum am scris-o eu si trage singur concluzile. 😂 Fi mai atent! T/C!

Aa, eu prost, aveam paranteza aia dupa "playerid" inutila acolo, da :)))) Multumesc mult de ajutor fram! Sanatate!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.