I’ve been banging my head against trying to strip that recipe book example down to relevant code (there’s just so much of it and it’s very entangled with its game). I don’t know if what I’ve done will even work, but there’s one error remaining that I don’t know what to do with. This line is throwing an error:
make delimiter index of count, continuing;
The error:
You wrote 'make delimiter index of count, continuing' : but this is a phrase which I don't recognise, possibly because it is one you meant to define but never got round to, or because the wording is wrong (see the Phrasebook section of the Index to check). Alternatively, it may be that the text immediately previous to this was a definition whose ending, normally a full stop, is missing?
I don’t know what that line of code is doing so thereby don’t know where to start troubleshooting it.
Table of Visible Exits
NPC second third heading chosen total
a person a person a person a direction a number
with 10 blank rows.
Table of Visible Entrances
NPC second third heading chosen total
a person a person a person a direction a number
with 10 blank rows.
To clear (current table - a table name):
repeat through current table:
blank out the whole row.
To tidy departures of (current table - a table name):
let next direction be up;
repeat through current table:
if heading chosen entry is next direction:
let accomplice be NPC entry;
choose row with heading chosen of next direction in the current table;
if total entry is 1:
now second entry is accomplice;
now total entry is 2;
if total entry is 2:
unless the second entry is accomplice:
now third entry is accomplice;
now total entry is 3;
choose row with NPC of accomplice in the current table;
blank out the whole row;
otherwise:
let next direction be heading chosen entry.
The last thing named is a thing that varies. Before printing the name of something (called target) which is not a person: now the last thing named is the target.
Report someone going a direction:
if the person asked is in the location,
choose a blank row in the table of visible entrances;
otherwise choose a blank row in the table of visible exits;
now NPC entry is the person asked;
now total entry is 1;
if the person asked is in the location,
now heading chosen entry is the opposite of the noun;
otherwise now heading chosen entry is the noun;
stop the action.
This is the movement reporting rule:
sort the Table of Visible Entrances in heading chosen order;
tidy departures of the table of visible entrances;
sort the Table of Visible exits in heading chosen order;
tidy departures of the table of visible exits;
let total row count be the number of filled rows in the Table of Visible Entrances plus the number of filled rows in the Table of Visible Exits;
if total row count is 0, rule succeeds;
generate descriptions from the Table of Visible Entrances;
generate descriptions from the Table of Visible Exits;
clear the Table of Visible Entrances; clear the Table of Visible Exits.
To generate descriptions from (current table - a table name):
let count be the number of filled rows in the current table;
if count is 0, rule succeeds;
let index be count;
repeat through the current table:
let accomplice be NPC entry;
if NPC entry is a person, now NPC entry is marked for listing;
if there is a second entry and second entry is a person, now second entry is marked for listing;
if there is a third entry and third entry is a person, now third entry is marked for listing;
let target be the room the heading chosen entry from the location;
if total entry is 3, say "[The NPC entry], [the second entry], and [the third entry] ";
if total entry is 2, say "[The NPC entry] and [the second entry] ";
if total entry is 1:
if the NPC entry is the last person named, say "[The NPC entry] ";
otherwise say "[The NPC entry] ";
if total entry is 1, say "[The NPC entry]s ";
otherwise say "walk[if total entry is 1]s[end if] ";
if the NPC entry is in the location:
if location is indoors and target is indoors, say "over from ";
if location is outdoors and target is indoors, say "out of ";
if location is indoors and target is outdoors, say "in from ";
if location is outdoors and target is outdoors, say "over from ";
otherwise:
if location is indoors and target is indoors, say "over to ";
if location is outdoors and target is indoors, say "into ";
if location is indoors and target is outdoors, say "out [if a door is visible][the random visible door][end if] to ";
if location is outdoors and target is outdoors, say "over to ";
if target is outdoors, say "[the heading chosen entry]";
otherwise say "[the target]";
if the total entry is 1 and count is 1 and accomplice carries something, say ", carrying [a list of things carried by the accomplice]";
decrement index;
make delimiter index of count, continuing;
now group size is total entry.
The last person named is a person that varies. Before printing the name of a person (called target): now the last person named is the target. Group size is a number that varies. Group size is 1.
To clear marked people:
repeat with named party running through people:
now the named party is not marked for listing.
Would someone be able to lend some advice?