SA-MP Forums Archive
A little problem; - 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: A little problem; (/showthread.php?tid=585725)



A little problem; - Aleksabre - 16.08.2015

I want to make a dialog MSG box with credits;
It says this warning:
Код:
C:\Users\Aleksa\Desktop\SAMP server [NEW]\gamemodes\gm.pwn(2789) : warning 202: number of arguments does not match definition
On this script:
Код:
#define DIALOG_CREDITS 5
Код:
if (strcmp("/credits", cmdtext, true, 10) == 0)
	{
 		ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"{6EF83C}Developers:\n{6EF83C}Scripter: {FF0000}play4fun Rank 5: Expert\n{6EF83C}Mapper: {FF0000}Adeis24 Rank 5: Expert\n{6EF83C}Mapper: {FFA500}Rat Rank 4: Professional\n{6EF83C}Mapper: {FF7F50}Gru Rank 2: Amateur", "{6EF83C}Close" , "");
		return 1;
	}
Код:
Code: 2789: ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"{6EF83C}Developers:\n{6EF83C}Scripter: {FF0000}play4fun Rank 5: Expert\n{6EF83C}Mapper: {FF0000}Adeis24 Rank 5: Expert\n{6EF83C}Mapper: {FFA500}Rat Rank 4: Professional\n{6EF83C}Mapper: {FF7F50}Gru Rank 2: Amateur", "{6EF83C}Close" , "");
The code is at 'OnPlayerCommandText'


Re: A little problem; - Trollerz - 16.08.2015

bro warning dosent matter


Re: A little problem; - Aleksabre - 16.08.2015

But.. I don't want to have warnings, there should be a way to fix this.


Re: A little problem; - X337 - 16.08.2015

Код:
ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Title Here", "{6EF83C}Developers:\n{6EF83C}Scripter: {FF0000}play4fun Rank 5: Expert\n{6EF83C}Mapper: {FF0000}Adeis24 Rank 5: Expert\n{6EF83C}Mapper: {FFA500}Rat Rank 4: Professional\n{6EF83C}Mapper: {FF7F50}Gru Rank 2: Amateur", "{6EF83C}Close" , "");
Take a look at this


Re: A little problem; - BlackBank - 16.08.2015

If you look closely to the arguments that are needed for ShowPlayerDialog on the wiki page, you will notice you forget to fill in the argument 'caption'. https://sampwiki.blast.hk/wiki/ShowPlayerDialog


Quote:
Originally Posted by Trollerz
Посмотреть сообщение
bro warning dosent matter
And yes, it does matters...


Re: A little problem; - Keyhead - 16.08.2015

Quote:
Originally Posted by Trollerz
Посмотреть сообщение
bro warning dosent matter
Don't listen to him. Warnings can highlight some serious problems that occur or could occur in your script. Try to keep the amount of warnings to the minimum, or eliminate them entirely.


Re: A little problem; - Aleksabre - 16.08.2015

Thank you, x337, you are the best.
P.S: I still remember you.

And, thanks all of you, too!
I guess you were right, we always make mistakes because of brackets or some not-placing the texts such as captions!