[Tutorial] [TUT] How to create a dialog. (Includes responding)
#15

pawn only checks if it is a multiple of tabsize, so if it is 4, it could be indented 0 4 8 12... but 1 2 3 5 6 7 9... would give warnings
yours:
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1338) {
if(response) {
  SendClientMessage(playerid,ORANGE, "Have Fun!");
} else {
  SendClientMessage(playerid, RED, "You selected 'Quit'. Goodbye!");
Kick(playerid);
  }
return 1;
}
return 0;
}
yours properly indented:
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 1338) {
    if(response) {
      SendClientMessage(playerid,ORANGE, "Have Fun!");
    } else {
      SendClientMessage(playerid, RED, "You selected 'Quit'. Goodbye!");
      Kick(playerid);
    }
    return 1;
  }
  return 0;
}
my edit of yours:
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 1338)
  {
    if(response)
    {
      SendClientMessage(playerid,ORANGE, "Have Fun!");
    }
    else
    {
      SendClientMessage(playerid, RED, "You selected 'Quit'. Goodbye!");
      Kick(playerid);
    }
    return 1;
  }
  return 0;
}

just wondering, what caused you to have write it as "[TUT]" in full caps, seems odd since it is an abbreviation, not a acronym. CIA (in full caps), Mrs. (first letter). I was just curious.
Reply


Messages In This Thread
[TUT] How to create a dialog. (Includes responding) - by PowerSurge - 28.10.2009, 13:26
Re: [TUT] How to create a dialog. (Includes responding) - by Daren_Jacobson - 28.10.2009, 13:42
Re: [TUT] How to create a dialog. (Includes responding) - by PowerSurge - 28.10.2009, 13:52
Re: [TUT] How to create a dialog. (Includes responding) - by Daren_Jacobson - 28.10.2009, 13:58
Re: [TUT] How to create a dialog. (Includes responding) - by PowerSurge - 28.10.2009, 13:58
Re: [TUT] How to create a dialog. (Includes responding) - by Daren_Jacobson - 28.10.2009, 14:14
Re: [TUT] How to create a dialog. (Includes responding) - by thuron - 28.10.2009, 14:30
Re: [TUT] How to create a dialog. (Includes responding) - by thuron - 28.10.2009, 14:32
Re: [TUT] How to create a dialog. (Includes responding) - by PowerSurge - 28.10.2009, 14:38
Re: [TUT] How to create a dialog. (Includes responding) - by thuron - 28.10.2009, 14:44
Re: [TUT] How to create a dialog. (Includes responding) - by Daren_Jacobson - 28.10.2009, 15:03
Re: [TUT] How to create a dialog. (Includes responding) - by thuron - 28.10.2009, 15:10
Re: [TUT] How to create a dialog. (Includes responding) - by Daren_Jacobson - 28.10.2009, 15:14
Re: [TUT] How to create a dialog. (Includes responding) - by PowerSurge - 28.10.2009, 15:25
Re: [TUT] How to create a dialog. (Includes responding) - by Daren_Jacobson - 28.10.2009, 15:28
Re: [TUT] How to create a dialog. (Includes responding) - by PowerSurge - 29.10.2009, 12:08
Re: [TUT] How to create a dialog. (Includes responding) - by Daren_Jacobson - 30.10.2009, 00:16
Re: [TUT] How to create a dialog. (Includes responding) - by thimo - 07.11.2009, 12:21
Re: [TUT] How to create a dialog. (Includes responding) - by BP13 - 07.11.2009, 15:14
Re: [TUT] How to create a dialog. (Includes responding) - by PowerSurge - 18.11.2009, 16:25
Re: [TUT] How to create a dialog. (Includes responding) - by _Raven - 02.12.2009, 11:53
Re: [TUT] How to create a dialog. (Includes responding) - by PowerSurge - 21.12.2009, 07:09
Re: [TUT] How to create a dialog. (Includes responding) - by Deat_Itself - 21.12.2009, 07:51
Re: [TUT] How to create a dialog. (Includes responding) - by xkniives - 29.01.2010, 04:20
Re: [TUT] How to create a dialog. (Includes responding) - by Xx_OutLawZ_xX - 07.08.2010, 00:11
Re: [TUT] How to create a dialog. (Includes responding) - by lightningcrow - 20.09.2010, 13:17
Re: [TUT] How to create a dialog. (Includes responding) - by Gavin - 16.11.2010, 05:58
Re: [TUT] How to create a dialog. (Includes responding) - by Gavin - 16.11.2010, 06:00

Forum Jump:


Users browsing this thread: 1 Guest(s)