A number based rulebook producing a list of numbers can be successfully created and compiles, but when compiled to Glulx, the game runs and then freezes when the result is called.
Steps to reproduce :
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 "[x].";
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].".
Additional information :
Output (when compiling to Glulx only):
>jump
1, 2 and 20.
followed by this error message at the bottom of the window:
Glulxe fatal error: Memory access out of range (-7FFFFFD2)
The code works as expected when compiled to zcode. Output:
Reported by : Skinny Mike
Description :
A number based rulebook producing a list of numbers can be successfully created and compiles, but when compiled to Glulx, the game runs and then freezes when the result is called.
Steps to reproduce :
Additional information :
Output (when compiling to Glulx only):
>jump
1, 2 and 20.
followed by this error message at the bottom of the window:
Glulxe fatal error: Memory access out of range (-7FFFFFD2)
The code works as expected when compiled to zcode. Output:
>jump
1, 2 and 20.
Boo!
1, 2 and 20.
A thread was started here:
https://www.intfiction.org/forum/viewtopic.php?f=7&t=26709
imported from: [Mantis 2077] trouble with getting a rule and/or rulebook to return a list of numbers