SA-MP Forums Archive
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=604947)



warning 202: number of arguments does not match definition - PrednizoN - 12.04.2016

Код:
C:\Users\Asus\Desktop\yeni rьtbeler\ww3\gamemodes\cod.pwn(968) : warning 202: number of arguments does not match definition
C:\Users\Asus\Desktop\yeni rьtbeler\ww3\gamemodes\cod.pwn(983) : warning 202: number of arguments does not match definition
C:\Users\Asus\Desktop\yeni rьtbeler\ww3\gamemodes\cod.pwn(998) : warning 202: number of arguments does not match definition
C:\Users\Asus\Desktop\yeni rьtbeler\ww3\gamemodes\cod.pwn(1013) : warning 202: number of arguments does not match definition
C:\Users\Asus\Desktop\yeni rьtbeler\ww3\gamemodes\cod.pwn(1028) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Warnings.
968-983-998-1013-1028;
Код:
ShowPlayerDialog(playerid, CLASS_DIALOG, DIALOG_STYLE_LIST, "Karakter Sınıfları","Karakter Sınıfları","Asker\nMedic -> 200 skor\nPyroman -> 500 skor\nKeskin Nişancı -> 2000 skor\nMьhendis -> 4500 skor\nJettrooper -> 6000 skor\nPilot -> 9000 skor", "Seз", "");



Re: warning 202: number of arguments does not match definition - NaS - 12.04.2016

There's one "Karakter Sınıfları" too much, there's only caption, info and the buttons as string (array) arguments.

But seriously, the next time look at how a function should look like (SA-MP Wiki for example) and count the arguments. Also the warning itself tells you exactly what's wrong.


Re: warning 202: number of arguments does not match definition - SyS - 12.04.2016

the showplayerdialog parameter is wrong
correct params is
PHP код:
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]); 
You may add it like this
PHP код:
ShowPlayerDialog(playerid, CLASS_DIALOG, DIALOG_STYLE_LIST, "Karakter Sınıfları","Asker\nMedic -> 200 skor\nPyroman -> 500 skor\nKeskin Nişancı -> 2000 skor\nMьhendis -> 4500 skor\nJettrooper -> 6000 skor\nPilot -> 9000 skor", "Seз", "");