SA-MP Forums Archive
Argument Type Mismatch on "uncomment" lines. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Argument Type Mismatch on "uncomment" lines. (/showthread.php?tid=270313)



Argument Type Mismatch on "uncomment" lines. - Yakushi Icefox - 19.07.2011

Hello. After I uncomment some lines om my GM, I get 26 erros "Argument Type Mismatch" on another lines, that doesn't have nothing to do with the below lines.

Lines [It is on OnPlayerDialogResponse]:

pawn Код:
else if(dialogid == 112)
        {
            new mats;
            switch(listitem)
            {
                case 0: mats = 50; //.45 / 9mm
                case 1: mats = 60; // 9mm silenced
                case 2: mats = 90; // Eagle
                case 3: mats = 115; //Shot
                case 4: mats = 120; //Sawn-off Shot
                case 5: mats = 120; //UZI
                case 6: mats = 130; //Ak
            }
            if(mats > gPlayerInfo[playerid][PLAYER_MATERIAIS]) return SendClientMessage(playerid, COLOR_RED, "[Erro] Nгo tens materiais o suficiente!");
            gPlayerInfo[playerid][PLAYER_MATERIAIS] -= mats;
            new strine[128], sendername[128];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            switch(listitem)
            {
                case 0: {
                    gPlayerInfo[playerid][COLT45] += 1;
                    format(string, sizeof(string), "* %s concluнu sua Colt .45", sendername);
                    closeMsg(playerid, string, COLOR_ME);
                } //.45 / 9mm
                case 1: {
                    gPlayerInfo[playerid][COLT45SI] += 1; // 9mm silenced
                    format(string, sizeof(string), "* %s concluнu sua 9mm silenciosa.", sendername);
                    closeMsg(playerid, string, COLOR_ME);
                }
                case 2: {
                    gPlayerInfo[playerid][EAGLE] += 1; // Eagle
                    format(string, sizeof(string), "* %s concluнu sua Eagle", sendername);
                    closeMsg(playerid, string, COLOR_ME);
                }
                case 3:
                    gPlayerInfo[playerid][SHOTGUN] += 1; //Shot
                    format(string, sizeof(string), "* %s concluнu sua Shotgun", sendername);
                    closeMsg(playerid, string, COLOR_ME);
                }
                case 4:
                    gPlayerInfo[playerid][SAWNSHOT] += 1; //Sawn-off Shot
                    format(string, sizeof(string), "* %s concluнu sua Sawnoff Shotgun", sendername);
                    closeMsg(playerid, string, COLOR_ME);
                }
                case 5:
                    gPlayerInfo[playerid][UZI] += 1; //UZI
                    format(string, sizeof(string), "* %s concluнu sua UZI", sendername);
                    closeMsg(playerid, string, COLOR_ME);
                }
                case 6:
                    gPlayerInfo[playerid][AK47] += 1; //Ak
                    format(string, sizeof(string), "* %s concluнu sua Ak-47", sendername);
                    closeMsg(playerid, string, COLOR_ME);
                }
            }
        }
The errors all appears in lines that call that stock, apparently:

pawn Код:
stock closeMsg(playerid, string[], color) {
    ProxDetector(50.0, playerid, string, color, color, color, color, color);
    return 1;
}
I did something wrong? ...

Thanks for the help, and sorry for my english.

Solved: I forget to open some brackets. I am really a idiot.