A little problem;
#1

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

bro warning dosent matter
Reply
#3

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

Код:
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
Reply
#5

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...
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)