Making a dialog with an input switch
#1

I've tried using this (the dialog works fine):
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 1)
  {
    switch(inputtext)
    {
      case "TDM":
      {
        SendClientMessage(playerid, COLOR_WHITE, "You picked Team Deathmatch.");
      }
      case "FFA":
      {
        SendClientMessage(playerid, COLOR_WHITE, "You picked Free For All.");
      }
      case "RP":
      {
        SendClientMessage(playerid, COLOR_WHITE, "You picked Roleplay.");
      }
    }
  }
  return 0;
}
But I get these errors:
Quote:

C:\Users\James\Desktop\SAMP\gamemodes\DM.pwn(227) : error 033: array must be indexed (variable "-unknown-")
C:\Users\James\Desktop\SAMP\gamemodes\DM.pwn(229) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\James\Desktop\SAMP\gamemodes\DM.pwn(233) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\James\Desktop\SAMP\gamemodes\DM.pwn(237) : error 001: expected token: "-string end-", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply


Messages In This Thread
Making a dialog with an input switch - by jameskmonger - 27.03.2010, 12:28
Re: Making a dialog with an input switch - by Carlton - 27.03.2010, 12:41
Re: Making a dialog with an input switch - by jameskmonger - 27.03.2010, 12:43
Re: Making a dialog with an input switch - by Carlton - 27.03.2010, 12:47
Re: Making a dialog with an input switch - by jameskmonger - 27.03.2010, 12:48
Re: Making a dialog with an input switch - by Carlton - 27.03.2010, 12:50

Forum Jump:


Users browsing this thread: 2 Guest(s)