Pawno crashing when compiling my dialog.
#1

My pawno crashes when I try to compile my Gamemode.
I've scripted a msgbox dialog in it, since than it won't compile properly, could someone take a quick look at it on what the cause could be and how I'd be able to fix it?

All of the dialog codes:

At the top of the page somewhere
[Don't mind the 4th dialog it spaces, it bugs on the forum]
PHP код:
/* DIALOGS */
#define DIALOG_REGISTER   1
#define DIALOG_LOGIN      2
#define    DIALOG_AGE        3
#define DIALOG_SEX        4
#define DIALOG_CREDITS    5 
Under OnDialogResponse: (Obviously )
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_CREDITS)
    {
        if(
reponse)
        {
            
SendClientMessage(playeridCOLOR_GREY"You've read the credits.");
         }
         else
        {
            
SendClientMessage(playeridCOLOR_GREY"You've read the credits.");
        }
        return 
1;
    }
    return 
0;

Under OnPlayerCommandText:
PHP код:
CMD:credits(playeridparams[])
{
    
ShowPlayerDialog(playeridDIALOG_CREDITSDIALOG_STYLE_MSGBOX"Credits of Vertical County Roleplay""MADE BY:\n2Jay Glenson\n2\n2Alternative Developement:\n2Classified\n2\n2Remaining Credits:\n2******, etc (includes)""Okay" "Cancel");
    return 
1;

Reply
#2

Try this ;
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_CREDITS)
    {
        if(
reponse)
        {
            
SendClientMessage(playeridCOLOR_GREY"You've read the credits.");
        }
         else
        {
            
SendClientMessage(playeridCOLOR_GREY"You've read the credits.");
        }
        return 
1;
    }
    return 
0;

if there no respond's
Try to see here , https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#3

zcmd situation does not require OnPlayerCommandText since its already included in the .inc file.
Reply
#4

pawn Код:
ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "Credits of Vertical County Roleplay", "MADE BY:\n2Jay Glenson\n2\n2Alternative Developement:\n2Classified\n2\n2Remaining Credits:\n2******, etc (includes)", "Okay", "Cancel");
You forgot a comma after "Okay" at the end. I fixed it in the code above.
Reply
#5

Quote:
Originally Posted by MCZOFT
Посмотреть сообщение
Try this ;
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_CREDITS)
    {
        if(
reponse)
        {
            
SendClientMessage(playeridCOLOR_GREY"You've read the credits.");
        }
         else
        {
            
SendClientMessage(playeridCOLOR_GREY"You've read the credits.");
        }
        return 
1;
    }
    return 
0;

if there no respond's
Try to see here , https://sampwiki.blast.hk/wiki/OnDialogResponse
I checked that, still don't know exactly how to use no response.

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
zcmd situation does not require OnPlayerCommandText since its already included in the .inc file.
Okay, it doesn't do any harm if I place it under the OnPlayerCommandText function right, cause I rather have it below that func.

Quote:
Originally Posted by RvGamers
Посмотреть сообщение
pawn Код:
ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "Credits of Vertical County Roleplay", "MADE BY:\n2Jay Glenson\n2\n2Alternative Developement:\n2Classified\n2\n2Remaining Credits:\n2******, etc (includes)", "Okay", "Cancel");
You forgot a comma after "Okay" at the end. I fixed it in the code above.
Thanks, it still wont compile though. Still crashing.
Reply
#6

Quote:
Originally Posted by NL-Sultan
Посмотреть сообщение
I checked that, still don't know exactly how to use no response.


Okay, it doesn't do any harm if I place it under the OnPlayerCommandText function right, cause I rather have it below that func.


Thanks, it still wont compile though. Still crashing.
Can you describe "crashing" in more detail? Do you mean your actual editor is crashing or that you are experiencing errors? Please elaborate and I'll be glad to help.
Reply
#7

FIXED

I placed the DialogOnResponse script infront of all other dialogs in case of after them, that made stuff bug.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)