Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - kelp

#1
Here's the code I've got:

Code: ags

function cDanielle_Talk()
{
  cElle.FaceCharacter(cDanielle);
  if (DanTalk==0)
  {
    dDan1.Start();
    DanTalk=1;
  }
  else if(DanTalk==1)
  {
    dDan4.Start();
    if (dDan4.HasOptionBeenChosen(1))
    {
      String input = txtUserInput.Text;
      Parser.ParseText(input);
      if (Parser.Said("window"))
      {
        cDanielle.Say("xxx");
        cDanielle.Say("xxxxx");
      }
      else
      {
        cDanielle.Say("xxxxxxx");
      }
    }
    else
    {
      cDanielle.Say("xxxxxxxx")
    }
  }
}


When I attempt to run this, I get this error code: undefined symbol 'txtUserInput'

I took this section of the code directly from the manual, so I'm at a loss. But also I've never attempted to use the parser before, so it's probably user error.

Thanks in advance!
#2
Here's what I've written in my room script file:

Code: ags

function room_LeaveLeft()
{
  if(player.HasInventory(iCita))
  {
    player.ChangeRoom(5,  730,  400, eDirectionLeft);
  }
  else
  {
    cElle.Think("I should probably find and take my meds first.");
  }
}


When I run the game, if Elle attempts to leave by the left side without the item Cita, it displays her thought, but it displays it forever, and I can't move or do anything except exit the game completely. The cursor becomes a small clock icon while it loops. The intended result of attempting to leave the room without Cita is to display the thought once and exit the loop, but I'm not sure what I'm doing wrong/how to do that. Feels like it should be simple, but I'm stuck.

Many thanks in advance.
SMF spam blocked by CleanTalk