I’m still trying to work on a dialogue system and am having a lot of problems with errors involving the tables I’m using. I don’t really have any idea what’s going wrong since technically the code is still working. I’m sorry this code is a bit long but after trying to shorten it, to take out some of the not as relevant parts of the code it just made things worse.
Lab is a room. Gwen is a woman. Gwen is here.
Y is a text that varies.
The index is a number that varies.
A person has a table name called Z.
X is a table name that varies.
V is a person that varies.
Table of Gwen's Dialogue Master
Conversation Speech Choice Table Selected
"Test" "I am testing!" Table of Gwen's Dialogue Test False
"Weather" "It sure is weather outside!" Table of Gwen's Dialogue Weather False
Table of Gwen's Dialogue Test
Choice Response next topic Selected Label
"Why are you testing?" "[carry out]" -- False number
"What are you testing?" "Testing is what I'm testing." "Weather" False --
Table of Gwen's Dialogue Weather
Choice Response Selected next topic Label
"Yep it sure is weather" "weather" false a text number
"What" "Huh" false -- --
The Z of Gwen is Table of Gwen's Dialogue Master.
To say carry out:
say "You did it".
To say next topic (R - a text):
say R.
Instead of jumping:
try Gwen starting conversation about "Test".
Understand "[a number]" as choosing.
Choosing is an action applying to one number.
Instead of doing something other than choosing when the command prompt is "You respond>":
do nothing.
Check choosing a number less than 1:
say "Natural numbers only";
stop the action.
Check choosing a number greater than index:
say "Please choose from the choices available.";
stop the action.
Starting conversation about is an action applying to one topic.
Understand "Start conversation about [text]" as starting conversation about.
[Check an actor starting conversation about a topic:
if the topic understood is not a conversation listed in the Z of the actor:
say the topic understood;
stop the action.]
Carry out an actor starting conversation about a topic:
now V is the actor;
now Y is the topic understood;
choose row with conversation of Y in the Z of V;
say "[V] says, [Speech entry]";
say paragraph break;
now X is Choice Table entry;
repeat with i running from 1 to the number of rows in the X:
choose row i in X;
say "[bracket][i][close bracket]. [Choice entry]";
say line break;
increase index by 1.
After jumping, which starts the start conversation action I keep getting this run time problem printed saying that it could not find the corresponding entry in the table, however it still manages to print the write text from both tables. As well the check rule that I have commented out, which is only checking to see if the topic of the action is in the table, leads to a Quixe error which then halts anything else from happening.
This has left me pretty confused and I don’t even know where to start with addressing this, so any help into illuminating why this is happening and how to fix it would be greatly appreciated.