SA-MP Forums Archive
I put a lot ShowPlayerDialog - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I put a lot ShowPlayerDialog (/showthread.php?tid=278338)



I put a lot ShowPlayerDialog - Join7 - 21.08.2011

I put a lot ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Title:", "Text", "Close", "");
and when compiled out Error: Send error, Don't send error (in pawno)
I put them on the 2x with the same written
By removing ShowPlayerDialog, which they repeat in 2x and does not compile error


Re: I put a lot ShowPlayerDialog - Jafet_Macario - 21.08.2011

Make sure you didn't forget any bracket " { " " } "


Re: I put a lot ShowPlayerDialog - Join7 - 21.08.2011

Code:
	if(strcmp(cmd, "/help", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
		    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}...:", "{00FBFB}Text\n{FF0000}Test!", "Close", "");
		}
		return 1;
	}
Well here's one who has it 2x. One way is under the command a second time under the button

By removing all commands ShowPlayerDialog be fine, but when you remove all of the buttons ShowPlayerDialog


Re: I put a lot ShowPlayerDialog - Join7 - 21.08.2011

Idea?


Re: I put a lot ShowPlayerDialog - Join7 - 22.08.2011

UPPP


Re: I put a lot ShowPlayerDialog - Pinguinn - 22.08.2011

I think it is somewhere else in the script


Re: I put a lot ShowPlayerDialog - Improvement™ - 22.08.2011

pawn Code:
if(strcmp(cmd, "/help", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}...:", "{00FBFB}Text\n{FF0000}Test!", "Close", "");
    }
    return 1;
}
Are you sure that you don't have double ShowPlayerDialog with dialogid 1? Because if you have multiple ShowPlayerDialog there will come an error or the compiler will crash.


Perhaps change the first one into the second one (under your /help command)
pawn Code:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}...:", "{00FBFB}Text\n{FF0000}Test!", "Close", "");
pawn Code:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}...:", "{00FBFB}Text\n{FF0000}Test!", "Close", "");


And change the first one into the second one (Under OnDialogResponse)
pawn Code:
if(dialogid == 1)
pawn Code:
if(dialogid == 10)
And then this should probably do it.
Reply if you still have any errors/warnings/crashes.

Kind Regards,
Improvement™



Re: I put a lot ShowPlayerDialog - Join7 - 22.08.2011

Do I have to put in OnDialogResponse if (dialogid == 1)...



EDIT: Do not be too long of lines, because the text is quite a line


Re: I put a lot ShowPlayerDialog - Improvement™ - 22.08.2011

Quote:
Originally Posted by Join7
View Post
Do I have to put in OnDialogResponse if (dialogid == 1)...
Well.. In this case of your ShowPlayerDialog that you are using right now for the command /help, OnDialogResponse is not needed at all.

But if you would like something to happen after the player that has executed the /help command and presses on "Close". To be kicked or recieving a message by SendClientMessage. But in this case you could just skip the OnDialogResponse part.


FIRST EDIT: Could you prodivide your whole OnDialogReponse Callback please?
Seeing that you added a screenshot of the compiler that has crashed.


Re: I put a lot ShowPlayerDialog - Join7 - 22.08.2011

As commands ShowPlayerDialog removed, leaving only newkeys =..., pawno compiles but gives error

Code:
D:\Server\gamemodes\drift.pwn(11960) : error 075: input line too long (after substitutions)
D:\Server\gamemodes\drift.pwn(11961) : error 037: invalid string (possibly non-terminated string)
D:\Server\gamemodes\drift.pwn(11961) : error 029: invalid expression, assumed zero
D:\Server\gamemodes\drift.pwn(11961) : error 029: invalid expression, assumed zero
D:\Server\gamemodes\drift.pwn(11961) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.