Hey gang,
Haven’t been around for a while so if this has been covered, just point me in the direction and I’ll be on my way. (I did check here and the bug tracker first but didn’t see it.)
I’m having trouble getting a rule and/or rulebook to return a list of numbers. This is a minimal example:[code]Lab is a room.
The set rules is a number based rulebook producing a list of numbers.
A set rule for a number (called n) (this is the default set rule):
let x be {1, 2};
add n to x;
say “.”;
rule succeeds with result x.
Instead of jumping:
let y be 20;
let z be the list of numbers produced by the set rules for y;
say “Boo!”;
say “[z].”.[/code]When compiling to Glulx, I get this:
Then the interpreter freezes and I get this error message:
Glulxe fatal error: Memory access out of range (-7FFFFFD2)
This happens when using either the “… produced by… rule” or “follow… rule” syntaxes:Instead of jumping:
let y be 20;
follow the set rules for y;
say "Boo!";
say "[y].".
Obviously, the above example doesn’t actually pass the results back, but it does at least run the rule. When I compile to zcode I get the expected outputs in both cases. This is surely a bug, but I’m not sure where. TIA