I am going bonkers over this error–that doesn’t give me what the unknown item is. I have exhausted by debug messages to see what’s what, all seems ok.
Here is the table lookup
otherwise if target is a magical weapon:
choose row with an Enchantment of (magic-type of target) in the Table of Excelsiors;
[Save the row data for use elsehwere]
now is-revealed entry is true;
now found-magic-type is Magic-type entry;
now found-description is Desc entry;
now found-revealed-state is is-revealed entry;
say "AUDIT: [found-magic-type] [found-revealed-state] [found-description][line break]";
and here is the table
Table of Excelsiors
Enchantment is-revealed Desc
"Short Sword +1" false "+1 To Hit and +1 Damage (d6+1); retrieved on command"
"Long Sword +2" false "+2 To Hit and +2 Damage (d8+2); retrieved on command"
Here is the item declaration:
The clean sword is on the cracked wall.
The clean sword is a magical weapon.
The magic-type of clean sword is "short sword +1".
Description of clean sword is "A normal looking short sword, but it is exceedingly clean and bright--not a speck of dirt (or blood) on it.[run paragraph on]".
Printed name of clean sword is "clean short sword".
Understand "short sword" as clean sword.
and here is the CAST action that triggers to table look-up:
Carry out Casting it on:
let target be second noun;
now target is revealed; [item-specific; does not update reference table]
if the topic understood matches "Read_Magic":
reveal magical item data for target;
say "The inscription glows faintly, morphs, then dims. The letters become...[line break][italic type][found-magic-type][roman type].";
now printed name of target is "[found-magic-type in title case]";
All fields are defined; it does compile.
Here is the output error:
What do you do? cast read_magic on “clean short sword”
What do you do? cast read_magic on clean short sword
AUDIT: spell = read_magic; target = clean short sword
AUDIT: magic-type of clean short sword = short sword +1Casting Read Magic on item…
clean short sword = short sword +1
*** Run-time problem P21: Attempt to look up a non-existent correspondence in the table ‘Table of Excelsiors’.
Glulxe fatal error: Memory access out of range (-6CF7FFF8)
I have several other quite similar table lookups that work fine.
Can anyone help me with this runtime error?