SA-MP Forums Archive
Dialog Giving me errors - 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: Dialog Giving me errors (/showthread.php?tid=201017)



Dialog Giving me errors - Lynn - 20.12.2010

pawn Код:
if(dialogid == DIALOGTUTORIAL)
    {
        if(response)
        {
            SendClientMessage(playerid, COLOR_WHITE, " TEXT HERE");
            PlayerInfo[playerid][pNewPlayer] = 2;
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, " TEXT HERE.");
            Kick(playerid);
        }
    )
When I add this, to OnDialogResponse it gives me tons of errors, but if I delete it, it complies fine. I don't get why.
I've tried removing the info in else and below, and still wont work. It's very irritating.
where it says, TEXT HERE I have different text.
I have the correct #defines as-well.
Im Using MSGBOX Dialog.


Re: Dialog Giving me errors - [L3th4l] - 20.12.2010

pawn Код:
if(dialogid == DIALOGTUTORIAL)
    {
        if(response)
        {
            SendClientMessage(playerid, COLOR_WHITE, " TEXT HERE");
            PlayerInfo[playerid][pNewPlayer] = 2;
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, " TEXT HERE.");
            Kick(playerid);
        }
    }
Try that


Re: Dialog Giving me errors - Lynn - 20.12.2010

What did you change?....


Re: Dialog Giving me errors - Sledge - 20.12.2010

Nothing, lol, he's probably a troll.

Based on my experiences, sometimes other codes can cause errors, but the pawn compiler will think that another line near it is the error.

So, look around for any missing ";" or brackets.


Re: Dialog Giving me errors - Retardedwolf - 20.12.2010

Lynn, he changed the last bracket to a brace.


Re: Dialog Giving me errors - Lynn - 20.12.2010

Oh wow... I feel retarded. Thanks for pointing that out xD


Re: Dialog Giving me errors - Sledge - 20.12.2010

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
Lynn, he changed the last bracket to a brace.
I didn't even notice that and I examined it for like 3 minutes.


Re: Dialog Giving me errors - Retardedwolf - 20.12.2010

Quote:
Originally Posted by Sledge
Посмотреть сообщение
I didn't even notice that and I examined it for like 3 minutes.
So learn a lesson and don't call someone a troll for no reason.


Re: Dialog Giving me errors - Sledge - 20.12.2010

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
So learn a lesson and don't call someone a troll for no reason.
The reason I called him a troll was because to both me and the OP he posted the same exact code as the one the OP posted. We both thought it was a troll until another user pointed out our mistakes. I then admitted my mistakes. Then some asshole decided to take advantage of my mistake and repost in this thread that should not have ever been posted in again. I do not forgive this asshole.