SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/01/2019, 04:58 AM   #1
DarkMythHunter
Big Clucker
 
DarkMythHunter's Avatar
 
Join Date: May 2017
Location: Philippines
Posts: 139
Reputation: 24
Default warning 202: number of arguments does not match definition

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"); 
__________________


DarkMythHunter is offline   Reply With Quote
Old 15/01/2019, 05:54 PM   #2
Chyakka
Big Clucker
 
Join Date: Jul 2015
Location: England
Posts: 61
Reputation: 10
Default Re: warning 202: number of arguments does not match definition

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.
Chyakka is offline   Reply With Quote
Old 15/01/2019, 09:56 PM   #3
rockys
Big Clucker
 
Join Date: Oct 2018
Location: pawn
Posts: 67
Reputation: 0
Default Re: warning 202: number of arguments does not match definition

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[])
rockys is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
warning 202: number of arguments does not match definition Rafaeloo Scripting Help 1 08/05/2016 12:00 PM
Warning: number of arguments does not match definition +REP Rodri99 Scripting Help 3 19/08/2015 09:52 PM
warning 202: number of arguments does not match definition jamesmith12 Scripting Help 4 28/07/2015 07:16 AM
warning 202: number of arguments does not match definition Slicebook Scripting Help 2 28/06/2014 08:06 PM
warning 202: number of arguments does not match definition Dripac Scripting Help 0 16/04/2012 11:13 AM


All times are GMT. The time now is 01:04 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.