Another Help
#1

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!!
Reply
#2

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");
Reply
#3

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;
                    }
Reply
#4

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;
}
Reply
#5

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");
Reply
#6

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!
Reply
#7

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.

Reply
#8

Now Fixed!! Thanks Red John
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)