Internal Error when using Dynamic Tables

I’m attempting an Inform implementation of Chaosium’s ORC-licensed Basic Roleplaying rules as an extension that I or others can use in our games to give them more of an RPG feel since most Inform games give me more of a classic adventure game feel which is great too but I feel the RPG experience (with characters with different stats and random rolls that influence a character’s path through the same story) is under-explored in the medium.

Anyway, I started implementing skills starting with a table of the BRP system’s skill list and a dynamic table of characters (using Version 5/140908 of Dynamic Tables by Jesse McGrew) whose skills are tracked and for each of those characters, a dynamic table of their skill values. And I think I got an implementation that holds together as far as that goes, except Inform started throwing an internal error that I’m at a total loss as to how to feasibly debug.

In case someone has the know-how to figure out what’s going wrong, I’ve attached the content of the extension as it currently stands, which triggers the internal error for me.

The error reported is too many arguments to an indirect function call here: inform/inter/building-module/Chapter 1/Inter Primitives.w at master · ganelson/inform · GitHub

I’m wondering if there’s some way to get something like a stack trace that would enable me to see the connection between what the compiler is trying to do and that line so I can start to understand what’s triggering it and what I need to change.

extension.i7x (7.7 KB)

It sounds like you’re using Inform 10 for this? I’m not aware of a version of Dynamic Tables that works for Inform 10; where did you find the one you’re using?

(Jesse McGrew has since changed her name to Tara, which is another sign that you’re using an old version of the extension—I imagine any Inform 10 version would be credited under her new name.)

1 Like

Correct.

It was some time ago so I don’t remember exactly. I thought it was the Friends of Inform 7 Github, but I don’t see it there now, so not sure.

Although it sounds like reverting to an earlier version of Inform (specifically 6L38 according to the Dynamic Tables extension source) would be a quick fix for this (but not great if I want this BRP extension to be adopted), I wonder how I’d go about adapting the Dynamic Tables extension for Inform 10. When I copy the text of the Dynamic Tables extension into a new extension project in Inform 10, it compiles and executes its tests successfully but fails in the same way when used as an extension, so I’m still not sure how to approach this error (or what it was about 6L38 that made it a prerequisite for Dynamic Tables version 5).

I’ve realized probably there’s no need for dynamic tables anyway. Table continuations mean each character can append their skills to a single table of character skills with a lookup rule to access them.

Intriguingly, I get the same exact error even after removing the Dynamic Tables dependency. I’ve attached the revised source demonstrating this.

extension.i7x (8.2 KB)

This was filed as Jira 2245:

If an entry of a table is of a certain kind, and it is changed when referenced as corresponding to an element in another column, the following internal error occurs: [the error you quoted]

(The line reported in that internal error seems to be meaningless.)

In your example, I narrowed it down to this bit:

To set the skill points of (P - person) in (S - skill) to (N - number):
	Let LP be "[P]-[S]";
	If LP is a CharacterSkill listed in Table of Character Skills:
		Now the Points corresponding to a CharacterSkill of LP in Table of Character Skills is N;

Climbingstars wrote:

A workaround for this is to use the choose notation instead.

If I’m reading your code correctly, this would be:

	If LP is a CharacterSkill listed in Table of Character Skills:
		choose the row with a CharacterSkill of LP in the Table of Character Skills;
		now the Points entry is N;
4 Likes

That change does look like it got around the internal error. Thanks so much!