warning 202: number of arguments does not match definition - 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)
+--- Thread: warning 202: number of arguments does not match definition (
/showthread.php?tid=662910)
warning 202: number of arguments does not match definition -
DarkMythHunter - 15.01.2019
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(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\
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");
Re: warning 202: number of arguments does not match definition -
Chyakka - 15.01.2019
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.
Re: warning 202: number of arguments does not match definition -
rockys - 15.01.2019
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[])