warning 202: number of arguments does not match definition
#1

I can't seem to find what's wrong here keeps showing me this error:
Code:
Utils/Mercenary.pwn(299) : warning 202: number of arguments does not match definition
PHP Code:
                case 0:
                {
                    new 
header[75];
                    
format(headersizeof(header), ""COL_YELLOW"Buying Items"COL_WHITE" | zCoins: "COL_GREEN"%d"pInfo[playerid][pzCoins]);
                    
ShowPlayerDialog(playeridDIALOG_MERCENARYBUYDIALOG_STYLE_TABLIST_HEADERSheader"Item\tCost(zCoins)",  "AK-47\t7\n\
                    M4A1\t7\n\
                    MP5-K\t6\n\
                    CZ61 Skorpion\t4\n\
                    PM73 RAK\t5\n\
                    Glock 19\t3\n\
                    Silenced Pistol\t3\n\
                    FNX45\t5\n\
                    MP-133\t6\n\
                    SPAS-12\t10\n\
                    A.H Fox\t6\n\
                    B95 Rifle\t10\n\
                    Alejandro Sniper Rifle\t13\n\
                    Knife\t2\n\
                    Baseball Bat\t2\n\
                    Golf Club\t2\n\
                    Pool Cue\t2\n\
                    Chainsaw\t5\n\
                    Fire Extinguisher\t5\n\
                    Shovel\t2\n\
                    Katana\t2\n\
                    Nitestick\t2\n\
                    Cane\t2\n\
                    "
"Select""Cancel");
                } 
Line 299:
PHP Code:
                    ", "Buy", "Cancel"); 
Reply
#2

You're passing two seperate arguments for the contents of the dialog.

Code:
"Item\tCost(zCoins)",  "AK-47\t7\n\
                    M4A1\t7\n\
                    MP5-K\t6\n\
                    CZ61 Skorpion\t4\n\
                    PM73 RAK\t5\n\
                    Glock 19\t3\n\
                    Silenced Pistol\t3\n\
                    FNX45\t5\n\
                    MP-133\t6\n\
                    SPAS-12\t10\n\
                    A.H Fox\t6\n\
                    B95 Rifle\t10\n\
                    Alejandro Sniper Rifle\t13\n\
                    Knife\t2\n\
                    Baseball Bat\t2\n\
                    Golf Club\t2\n\
                    Pool Cue\t2\n\
                    Chainsaw\t5\n\
                    Fire Extinguisher\t5\n\
                    Shovel\t2\n\
                    Katana\t2\n\
                    Nitestick\t2\n\
                    Cane\t2\n\
                    "
Should be merged into one, with the DIALOG_STYLE_TABLIST_HEADERS style it's just the first line before \n that will be the header of the dialog.
Reply
#3

Code:
format(header, sizeof(header), ""COL_YELLOW"Buying Items"COL_WHITE" | zCoins: "COL_GREEN"%d", pInfo[playerid][pzCoins]); 
ShowPlayerDialog(playerid, DIALOG_MERCENARYBUY, DIALOG_STYLE_TABLIST_HEADERS, header, "Item\tCost(zCoins)",  "AK-47\t7\n\ 
switch header with - item\tcost

new header[300];
format(header,sizeof header,"
                    Item\tCost(zCoins)\n
                    AK-47\t7\n\ 
                    M4A1\t7\n\ 
                    MP5-K\t6\n\ 
                    CZ61 Skorpion\t4\n\ 
                    PM73 RAK\t5\n\ 
                    Glock 19\t3\n\ 
                    Silenced Pistol\t3\n\ 
                    FNX45\t5\n\ 
                    MP-133\t6\n\ 
                    SPAS-12\t10\n\ 
                    A.H Fox\t6\n\ 
                    B95 Rifle\t10\n\ 
                    Alejandro Sniper Rifle\t13\n\ 
                    Knife\t2\n\ 
                    Baseball Bat\t2\n\ 
                    Golf Club\t2\n\ 
                    Pool Cue\t2\n\ 
                    Chainsaw\t5\n\ 
                    Fire Extinguisher\t5\n\ 
                    Shovel\t2\n\ 
                    Katana\t2\n\ 
                    Nitestick\t2\n\ 
                    Cane\t2\n\ ");
ShowPlayerDialog(playerid, DIALOG_MERCENARYBUY, DIALOG_STYLE_TABLIST_HEADERS, "Weapon Shop", header, "BUY","CLOSE");



ShowPlayerDialog(playerid, dialogid, style, TITLE, HERE IS HEADER, button1[], button2[])
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)