SA-MP Forums Archive
Another Help - 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: Another Help (/showthread.php?tid=375895)



Another Help - MrReBzz - 08.09.2012

Hi, I need help fixing this warning, The warning is

Код:
E:\Scripts\CrAzy Town RolePlay\gamemodes\CTR.pwn(344) : warning 202: number of arguments does not match definition
E:\Scripts\CrAzy Town RolePlay\gamemodes\CTR.pwn(344) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
When I add This Command!

Код:
	if(strcmp("/credits", cmdtext, true) ==0)
	{
	ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Credits Goes To","LuxurioN™ For His Admin Script (LuxAdmin)","SATDM Gamemode For Providing With Classes","MrReBzz For Scripting This Gamemode","Ok","Cancel");

	return 1;
	}
And The dialog Response is :

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 10)
                  {
                       if(!response) return 1;
                        if(response) return 1;
					}
	return 1;
}
I hope Some one can help me Fix it!!


Re: Another Help - kbalor - 08.09.2012

pawn Код:
ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Credits Goes To","LuxurioN™ For His Admin Script (LuxAdmin)","SATDM Gamemode For Providing With Classes","MrReBzz For Scripting This Gamemode","Ok","Cancel");
Change to this.... You can't just add ("text") You can use \n - next line \t - indent or make a spacing

pawn Код:
ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Credits Goes To","LuxurioN™ For His Admin Script (LuxAdmin) \nSATDM Gamemode For Providing With Classes \nMrReBzz For Scripting This Gamemode","Ok","Cancel");



Re: Another Help - clarencecuzz - 08.09.2012

pawn Код:
if(strcmp(cmdtext, "/credits", true) == 0)
{
    ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Credits Goes To:","LuxurioN™ For His Admin Script (LuxAdmin)\nSATDM Gamemode For Providing With Classes\nMrReBzz For Scripting This Gamemode","Ok","Cancel");
    return 1;
}
There is no need for the OnDialogResponse lines for this dialog. So you can remove these lines:
pawn Код:
if(dialogid == 10)
                  {
                       if(!response) return 1;
                        if(response) return 1;
                    }



Re: Another Help - sniperwars - 08.09.2012

pawn Код:
if(strcmp("/credits", cmdtext, true) ==0)
{
    ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Credits", "Credits Goes To LuxurioN™ For His Admin Script (LuxAdmin). SATDM Gamemode For Providing With Classes and MrReBzz For Scripting This Gamemode","Ok","Cancel");
    return 1;
}



Re: Another Help - RedJohn - 08.09.2012

pawn Код:
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Credits Goes To", "LuxurioN™ For His Admin Script (LuxAdmin)\nSATDM Gamemode For Providing With Classes\nMrReBzz For Scripting This Gamemode","Ok","Cancel");



Re: Another Help - Vince - 08.09.2012

It doesn't work like that. Use \n inside the string to create new lines.

pawn Код:
"a\nb\nc"
or alternatively
pawn Код:
"a\n\
b\n\
c"
Edit: What the fuck?! Four replies!


Re: Another Help - MrReBzz - 08.09.2012

But I still Get The Warning

Quote:

E:\Scripts\CrAzy Town RolePlay\gamemodes\CTR.pwn(344) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.




Re: Another Help - MrReBzz - 08.09.2012

Now Fixed!! Thanks Red John