Problems with conversation tables, and NPC Character

Hi, I am new here and trying to make my first IF game.

For a game that is currently in progress, i have run into a hick-up. The character that the player is to speak with doesn’t respond. I am not sure what is going wrong since everything up to that point works. However no interaction with the charater is possible for some reason. I am using Inform 7.

The code for review (i drew the conversation table from what is the manual/help stuff.

[spoiler][code]Anna’s quarters is a room. Anna’s quarters is southwest of Hallway 1. Anna’s bunk is in Anna’s quarters. Anna’s locker is in Anna’s quarters. Anna is a woman. Anna is in Anna’s bunk. Anna is either awake or asleep. Anna is asleep. The description of Anna’s quarters is “This room is similiar to yours. It has a bunk and a locker. [If we have woken anna]Anna stands in her quarters, looking groggy. [otherwise]You can see Anna asleep in the bunk. [end if]”

A subject is a kind of thing. Some subjects are defined by the Table of Anna’s Conversation Subjects.

Table of Anna’s Conversation Subjects
subject conversation
Events Table of Past Events
Tasks Table of Tasks Needed

Understand “job” or “jobs” as tasks.

Table of Past Events
quip discussion label subtopics
“What happened?” “‘After you were put out, the ship continued on to the station.’” 0 –
“Then what?” “‘We traveled for several days. Then we ran into another ship. It opened fire on us.’” 0 –
“And then?” “‘We fought them for several hours. When the battle was over, we had been severely damaged.’” 0 –
“Go on.” “‘We worked on the ship. While you were asleep, there was an explosion.’” 0 –
“Explosion?” “‘Yes. One of the power conduits ruptured. I worked on the repairs from the explosions.’” 0 –
“Is the ship fixed?” “‘Yes, the ship was repaired. I went to sleep. The ship is currently drifting with low power on.’” 0 –
“How can I help?” “‘Well, you can help with repairs. I have been working several shifts since. Help would be nice.’” 0 –
“The others?” “‘I’m afraid that we are all alone here. The others are dead or have gone mad. I hide in my room.’” 0 –

Table of Tasks Needed
quip discussion label subtopics
“What needs doing?” “‘You can help by doing repairs where they are needed.’” 0 Table of Repairs
“What repairs are needed?” “‘The repairs we need are: Reactors, Engines, Flight Computer, Sensors, Navigation.’” 0 Table of Repairs

Table of Repairs
quip discussion label Subtopics
“Reactors” “‘Main reactors are offline. Get them online by locating the secondary power feeds and routing the charges into the mains.’” 0 –
“Engines” “‘The engines need to be charged. Locate the fuel rod room and put new fuel rods into the engines to replace the dead ones.’” 0 –
“Flight Comp” “’ The flight computer needs to have its software reloaded. Locate the Flight Disk and put it into the Flight Computer.’” 0 –
“Sensors” “‘The sensors need to recalibrated. Find the Sensor Data to recalibrate the sensors. We should be able to use them after that.’” 0 –
“Navigation” “‘To fix Navigation, you will need to find the Nav charts which are on the Nav Card. Put the card into the Flight Computer.’” 0 –

To copy (first table - a table name) to (second table - a table name):
repeat through first table:
if there is a quip entry, let copied quip be quip entry;
otherwise let copied quik be “blank”;
if there is a discussion entry, let copied discussion be discussion entry;
otherwise let copied discussion be “blank”;
if there is a subtopics entry, let copied subtopics be subtopics entry;
otherwise let copied subtopics be second table;
choose a blank row in the second table;
if copied quip is not “blank”, now quip entry is copied quip;
if copied discussion is not “blank”, now discussion entry is copied discussion;
if copied subtopics is not second table, now subtopics entry is copied subtopics.

Current conversation table is a table name that varies. Current conversation table is Table of Anna’s Conversation Subjects.

Interlocutor is a person that varies.

Understand “ask [someone] about [any subject]” as asking it about the subject.

Asking it about the subject is an action applying to two visible things.

Carry out asking it about the subject:
say “You can’t think of anything to say.”

Instead of asking someone about the subject a subject listed in the Table of Anna’s Conversation Subjects:
now interlocutor is noun;
now current conversation table is the conversation of the second noun;
if the number of filled rows in the current conversation table is 1:
repeat through current conversation table:
now label entry is 1;
now number understood is 1;
try selecting 1 instead;
if the number of filled rows in the current conversation table is 0:
say “You can think of nothing further to say on that topic.”;
stop the action;
otherwise:
let index be 0;
let total be the number of filled rows in the current conversation table;
say "Do you mean ";
repeat through current conversation table:
now index is index + 1;
now label entry is index;
say “([index]) [quip entry]”;
if index is total, say “?”;
if index is total - 1, say ", or ";
if index is less than total - 1, say ", ".

Understand “[number]” as selecting.

Selecting is an action applying to one number.

Carry out selecting:
say “No such option is available.”

Instead of selecting a label listed in the current conversation table:
say “[discussion entry][paragraph break]”;
if there is a subtopics entry:
copy subtopics entry to current conversation table;
choose row with label of number understood in the current conversation table;
blank out the whole row.[/code][/spoiler]
Thanks for the help in advance…

I suspect “otherwise let copied quik be “blank”;” should read “quip”; and the tab levels in the big code block should probably be

Instead of asking someone about the subject a subject listed in the Table of Anna's Conversation Subjects: now interlocutor is noun; now current conversation table is the conversation of the second noun; if the number of filled rows in the current conversation table is 1: repeat through current conversation table: now label entry is 1; now number understood is 1; try selecting 1 instead; if the number of filled rows in the current conversation table is 0: say "You can think of nothing further to say on that topic."; stop the action; otherwise: let index be 0; let total be the number of filled rows in the current conversation table; say "Do you mean "; repeat through current conversation table: now index is index + 1; now label entry is index; say "([index]) [quip entry]"; if index is total, say "?"; if index is total - 1, say ", or "; if index is less than total - 1, say ", ".

And as for getting subtopics working… Actually, try something like this:

[code]Instead of asking someone about the subject a subject listed in the Table of Anna’s Conversation Subjects,
table-talk about the conversation of the second noun with the noun.

To table-talk about (T - a table name) with (P - a person):
now interlocutor is P;
now current conversation table is T;
if the number of filled rows in the current conversation table is 1:
repeat through current conversation table:
now label entry is 1;
now number understood is 1;
try selecting 1;
stop the action;
if the number of filled rows in the current conversation table is 0:
say “You can think of nothing further to say on that topic.”;
stop the action;
otherwise:
let index be 0;
let total be the number of filled rows in the current conversation table;
say "Do you mean ";
repeat through current conversation table:
now index is index + 1;
now label entry is index;
say “([index]) [quip entry]”;
if index is total, say “?”;
if index is total - 1, say ", or ";
if index is less than total - 1, say ", ".

Understand “[number]” as selecting.

Selecting is an action applying to one number.

Carry out selecting:
say “No such option is available.”

Instead of selecting a label listed in the current conversation table:
say “A”;
choose row with label of number understood in the current conversation table;
say “[discussion entry][paragraph break]”;
if there is a subtopics entry:
now current conversation table is subtopics entry;
blank out the whole row;
table-talk about the current conversation table with the interlocutor;
otherwise:
blank out the whole row.[/code]

Of course, since the quips in your Table of Past Events are meant to be sequential, you’re going to need different logic to make it behave as intended.

I fixed the “quik” error. For some reason, the conversation still doesn’t work, and Anna does not respond to anything and can’t be interacted with. Is the table the best one to use in this case? I want for anna to explain some things for the player and let them know what the objectives are.
Also, is there a way to create a table or list for objectives? one that the player can check to see what has been done by them and what they still need to do?

A last thing, trying to wake anna only produces the response “that seems unnecessary”. Why is that response coming up?

Thanks in advance for help.

But did you fix the tabs in the Instead of asking someone about the subject block?

if the number of filled rows in the current conversation table is 1: repeat through current conversation table: now label entry is 1; now number understood is 1; try selecting 1 instead;

should be if the number of filled rows in the current conversation table is 1: repeat through current conversation table: now label entry is 1; now number understood is 1; try selecting 1 instead;

to make selecting a conversation behave properly.

I fixed the tabs as well as the “quik” error.

From the game:
Anna’s quarters
This room is similiar to yours. It has a bunk and a locker. You can see Anna asleep in the bunk.

You can see Anna’s bunk (in which is Anna) and Anna’s locker here.

talk to anna
I didn’t understand that number.

talk to anna
I didn’t understand that number.

talk to anna about what happened
I didn’t understand that number.

ask anna about what happened
There is no reply.

ask anna about repairs
There is no reply.

wake up anna
That seems unnecessary.

Is there some way that i am doing this wrong? Should the sections in the tables be separated by only one tab or are they supposed to be lined up when reading down?

Edit: Oddly, i figured out to get the conversation going by saying “Ask anna about events.” but i came up on that idea by luck, and i don’t think players would have that occur to them. I think maybe a hint is needed, and how would i do that?

Got this error:
P25 - Attempt to choose a blank row in a table with none left

Most problems are detected when Inform translates the source text, but this is one of the exceptions, a “run-time problem” which emerges only during play.

Inform allows us to create tables with one or more blank rows to be filled in during the course of play. In any given table the number of blank rows can go down (if we write to an entry on a blank row, it is no longer blank) or up (if we blank out an existing non-blank row), but it will certainly be limited. So if we go on trying to choose blank rows and filling them in, we will eventually run out. This is the run-time problem which announces that.

In particular, of course, you would see this message if you tried to choose a blank row in a table which never had any blank rows to start with.

from game:

ask anna about tasks
Do you mean (1) What needs doing?, or (2) What repairs are needed??

1
“You can help by doing repairs where they are needed.”

*** Run-time problem P25: Attempt to choose a blank row in a table with none left: table ‘Table of Tasks Needed’.

2
“To fix Navigation, you will need to find the Nav charts which are on the Nav Card. Put the card into the Flight Computer.”

*** Run-time problem P25: Attempt to choose a blank row in a table with none left: table ‘Table of Tasks Needed’.

I was running the conversation. Not sure what went wrong or how.