I’m trying to make a system whereby NPC activities are added to a table and then regurgitated at the end of the turn. The goal of this is to combine something like this:[code]Paul goes south.
John goes south.
Ringo goes south.
George goes south.[/code]into this:
Paul, John, Ringo and George go south.
A little more elegant, I think; and since the majority of my WIP is being in an area with these NPCs, this will condense the output and make it much easier to read.
Here is what I have so far:[code]Table of NPC Activity
who activity
person indexed text
Paul –
John –
Ringo –
George –
Every turn:
…
*** major snip ***
…
now the activity corresponding to a who of whoIsIt in the Table of NPC Activity is “goes [whichWay] to [curLocation]”;[/code]
This line is giving me the following error:
*** BlkValueWrite: writing to index out of range: 24 in 781990 ***
I originally thought that perhaps it had something to do with calculating the contents of the indexed text, and so I did this:let tempActivity be indexed text;
now tempActivity is "goes [whichWay] to [curLocation]";
now the activity corresponding to a who of whoIsIt in the Table of NPC Activity is tempActivity;
But that gave me the following error:
*** Deep copy failed: destination empty ***
And so with this I’m out of ideas.
How do I put this simple indexed text into a table? What am I missing?