I am trying to reference a table from inside another table. The code below is incorrect and incomplete, but should get across what I am trying to do.

Table of Example 1
number table
1 Table of Example 2
Table of Example 2
rule number
example rule 1
When play begins:
repeat through Table of Example 1:
repeat through the table entry:
follow the rule entry for the number entry;

So the problem is not that a table can’t store a table name, but that a table name stored in a table can’t be used in a repeat phrase? If that’s right, I’m in trouble on this endeavor because the entire idea is that in he final version of this (if there ever is one) I’d need to use a repeat phrase, not a choose, because there would be multiple rows that need to be selected programmatically by repeating through them to find the correct one to use in a circumstance.

Nevermind… this seems to work fine, but for some reason it was giving me an error on the repeat phrase indeed before, and I don’t know what I had different. It works now without issue, probably just some weird missed syntax or something in my real code that I entered and then fixed without noticing. If it happens again, I’ll post a more complete example…

What was the error with your original code? As far as I can tell the table was fine, the repeat statements were fine, and the compiler was only complaining about the “follow” line.

I’m actually not certain what was happening before, but this is very related… I’m trying to pass a rule entry from one part of the table processing logic to the other, and getting an issue there now. Again, the rule itself is incomplete nonsense right now, just for example, but I’m getting an error with this that it doesn’t seem like it can understand the follow rule again. (please excuse the table formatting being wonky in the forum).

Adding is a number based rulebook.
Adding a number (called it) (this is the add a number rule):
say "[it]";
Table of Example 1
rule number t-name
add a number rule 1 Table of Example 2
Table of Example 2
number
1
When play begins:
repeat through Table of Example 1:
let x be the rule entry;
repeat through the t-name entry:
follow x for the number entry;

You can work around this by fooling I7’s type system. Of course this will break horribly if you put a rule in the table which isn’t number-based.

The Kitchen is a room.
Adding is a number based rulebook.
Adding a number (called X) (this is the add a number rule):
say "Rule got [X].";
Adding a number (called X) (this is the other-add a number rule):
say "Other rule got [X].";
Table of Example 1
number table
1 Table of Example 2
Table of Example 2
rule (number based rule) number
add a number rule 1
other-add a number rule 2
To decide what number based rule is forcibly cast (R - rule): (- {R} -).
When play begins:
showme the contents of Table of Example 2;
repeat through Table of Example 1:
repeat through the table entry:
let R be forcibly cast the rule entry;
follow R for the number entry.

(Note that you shouldn’t use “it” as a variable, because “[it]” is a substitution from the adaptive text system.)

Thank you for this, zarf. Why is it that it seems every time I try to do something, it requires an I6 hack? I’m going to start a different topic about what I’m trying to achieve and see if there’s a better way entirely to go about it.