SA-MP Forums Archive
OnPlayerDialogResponse Error, Pleeaaaseeee Help!!! - 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: OnPlayerDialogResponse Error, Pleeaaaseeee Help!!! (/showthread.php?tid=253578)



[SOLVED] OnPlayerDialogResponse Error, Pleeaaaseeee Help!!! - Ouch_Charlie - 07.05.2011

Problem Solved, Delete it please


Re: OnPlayerDialogResponse Error, Pleeaaaseeee Help!!! - [NoV]LaZ - 07.05.2011

Because of your horrible way of indenting your code, you misplaced your braces.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if (dialogid == 4)
    {
        if (response)
        {
            SendClientMessage(playerid,0x008000FF, "You accepted the rules, Make sure you follow them!");
        }
        else
        {
            SendClientMessage(playerid,0xFF0000FF, "Oh you don't agree? pwned!!");
            Kick(playerid);
        }
    }
    else if (dialogid == 1)
    {
        if (response)
        {
            SendClientMessage(playerid,0x008000FF, "You Pressed Ok");
        }
        else
        {
            SendClientMessage(playerid,0xFF0000FF, "You Closed The Commands Menu");
            Kick(playerid);
        }
    }
    return 1;
}



Re: OnPlayerDialogResponse Error, Pleeaaaseeee Help!!! - Ouch_Charlie - 07.05.2011

Quote:
Originally Posted by [NoV]LaZ
Посмотреть сообщение
Because of your horrible way of indenting your code, you misplaced your braces.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if (dialogid == 4)
    {
        if (response)
        {
            SendClientMessage(playerid,0x008000FF, "You accepted the rules, Make sure you follow them!");
        }
        else
        {
            SendClientMessage(playerid,0xFF0000FF, "Oh you don't agree? pwned!!");
            Kick(playerid);
        }
    }
    else if (dialogid == 1)
    {
        if (response)
        {
            SendClientMessage(playerid,0x008000FF, "You Pressed Ok");
        }
        else
        {
            SendClientMessage(playerid,0xFF0000FF, "You Closed The Commands Menu");
            Kick(playerid);
        }
    }
    return 1;
}
Thanks it works and btw it's not my horrible way of indenting the code /quote fucked it up anyways thanks