Jump to content

Recommended Posts

Posted

salut am adaugat si eu un sistem de trylucky pe un gm bigzone edit de alexrap 

si am erorile astea:

gm.pwn(23396) : error 040: duplicate "case" label (value 187)
gm.pwn(23404) : warning 202: number of arguments does not match definition
gm.pwn(23408) : warning 202: number of arguments does not match definition
gm.pwn(23412) : warning 202: number of arguments does not match definition
gm.pwn(23416) : warning 202: number of arguments does not match definition
gm.pwn(23420) : warning 202: number of arguments does not match definition
gm.pwn(23424) : warning 202: number of arguments does not match definition
gm.pwn(23429) : warning 202: number of arguments does not match definition
gm.pwn(23435) : warning 202: number of arguments does not match definition
gm.pwn(23439) : warning 202: number of arguments does not match definition
gm.pwn(23443) : warning 202: number of arguments does not match definition
gm.pwn(23447) : warning 202: number of arguments does not match definition

codu;

case DIALOG_TRYLUCKY: {
            if(!response) return 1;
            if(GetPlayerCash(playerid) <= strval(inputtext)) return SCM(playerid, COLOR_GREY, "Nu ai aceasta suma la tine!"); 
            if(strval(inputtext) < 10000000) return SCM(playerid, COLOR_GREY, "Suma minima este de $10.000.000");
            new castig = 1 + random(10);
            switch(castig) {
                case 1: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 2: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 3: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 4: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 5: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 6: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 7: {
                    new stringsds[128];
                    GivePlayerCash(playerid, strval(inputtext)*2);
                    SCM(playerid, COLOR_RED, "Azi ai avut noroc si ai {FFFFFF}castigat{CC0000} $%s!", FormatNumber(strval(inputtext)*2));
                    format(stringsds, sizeof(stringsds), "%s a avut noroc si a {FFFFFF}castigat{CC0000} $%s!", GetName(playerid), FormatNumber(strval(inputtext)*2));
                    SendClientMessageToAll(COLOR_RED, stringsds);
                }
                case 8: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 9: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 10:{
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                } 
                case 11:{
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
            }
        }

va rog ajutor !!

Posted (edited)
12 hours ago, Mihai FTW said:

salut am adaugat si eu un sistem de trylucky pe un gm bigzone edit de alexrap 

si am erorile astea:

gm.pwn(23396) : error 040: duplicate "case" label (value 187)
gm.pwn(23404) : warning 202: number of arguments does not match definition
gm.pwn(23408) : warning 202: number of arguments does not match definition
gm.pwn(23412) : warning 202: number of arguments does not match definition
gm.pwn(23416) : warning 202: number of arguments does not match definition
gm.pwn(23420) : warning 202: number of arguments does not match definition
gm.pwn(23424) : warning 202: number of arguments does not match definition
gm.pwn(23429) : warning 202: number of arguments does not match definition
gm.pwn(23435) : warning 202: number of arguments does not match definition
gm.pwn(23439) : warning 202: number of arguments does not match definition
gm.pwn(23443) : warning 202: number of arguments does not match definition
gm.pwn(23447) : warning 202: number of arguments does not match definition

codu;

case DIALOG_TRYLUCKY: {
            if(!response) return 1;
            if(GetPlayerCash(playerid) <= strval(inputtext)) return SCM(playerid, COLOR_GREY, "Nu ai aceasta suma la tine!"); 
            if(strval(inputtext) < 10000000) return SCM(playerid, COLOR_GREY, "Suma minima este de $10.000.000");
            new castig = 1 + random(10);
            switch(castig) {
                case 1: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 2: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 3: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 4: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 5: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 6: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 7: {
                    new stringsds[128];
                    GivePlayerCash(playerid, strval(inputtext)*2);
                    SCM(playerid, COLOR_RED, "Azi ai avut noroc si ai {FFFFFF}castigat{CC0000} $%s!", FormatNumber(strval(inputtext)*2));
                    format(stringsds, sizeof(stringsds), "%s a avut noroc si a {FFFFFF}castigat{CC0000} $%s!", GetName(playerid), FormatNumber(strval(inputtext)*2));
                    SendClientMessageToAll(COLOR_RED, stringsds);
                }
                case 8: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 9: {
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
                case 10:{
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                } 
                case 11:{
                    GivePlayerCash(playerid, -strval(inputtext));
                    SCM(playerid, COLOR_RED, "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));
                }
            }
        }

va rog ajutor !!

Ai 11 case-uri iar tu ai new castig = 1 + random(10); care poate avea valoarea maxima 10, deci case 11 nu o sa fie niciodata atins. Pune new castig = 1 + random(11); si revino cu reply.

Edit: iar la toate mesajele SCM, cred ca ai vrut sa pui SCMf (cel mai probabil ai functia asta definita in gm) pentru ca folosesti %s. Sau daca nu poti face cu format.

new string[144];

format(string, sizeof(string), "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));

SCM(playerid, COLOR_RED, string);

Edited by TheGodfather
Posted
11 minutes ago, TheGodfather said:

Ai 11 case-uri iar tu ai new castig = 1 + random(10); care poate avea valoarea maxima 10, deci case 11 nu o sa fie niciodata atins. Pune new castig = 1 + random(11); si revino cu reply.

Edit: iar la toate mesajele SCM, cred ca ai vrut sa pui SCMf (cel mai probabil ai functia asta definita in gm) pentru ca folosesti %s. Sau daca nu poti face cu format.

new string[144];

format(string, sizeof(string), "Azi nu ai avut noroc si ai {FFFFFF}pierdut{CC0000} $%s!", FormatNumber(strval(inputtext)));

SCM(playerid, COLOR_RED, string);

Poate sa puna si case 100 ca nu are treaba. Apropo 1 + 10 cat face domnule?

Cat despre erori zice ca case-ul 187 exista deja, deci cel mai probabil nu e de acolo.

Posted (edited)
30 minutes ago, iSorin[] said:

Poate sa puna si case 100 ca nu are treaba. Apropo 1 + 10 cat face domnule?

Cat despre erori zice ca case-ul 187 exista deja, deci cel mai probabil nu e de acolo.

Nu mai spune daca nu stii, random(10) merge de la 0 la 9. Nu ti-a iesit tentativa de baza pup

Edited by TheGodfather

Join the conversation

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

Guest
Reply to this topic...

×   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.

×
×
  • 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.