I’m getting a runtime error and I don’t understand why my code is generating one.
lab is a room.
color is a kind of value. The colors are nondescript, aqua, crimson, emerald, gray, indigo, khaki, magenta, orange, and quartz.
A fuse is a kind of thing.
A fuse has a color. Understand the color property as describing a fuse.
The description of a fuse is "This is [an color of the item described] colored electrical fuse."
The printed name of a fuse is "[an color of the item described] colored fuse".
An aqua fuse called an fuse1 is in the merchandise stand. The color of fuse1 is aqua.
when play begins:
say "[fuse1].";
say "[the printed name of fuse1].";
say "[the printed name of fuse1 in title case]".
I’m not skilled enough to explain exactly why, but using an intermediate temporary variable that sets the text value before reprocessing it solves the problem.
When play begins:
let LocalText be "[the printed name of fuse1]";
say "[LocalText in title case]";
don’t know if this will fix your game or not, but I usually set these at runtime. printed names can be changed at any time.
lab is a room.
color is a kind of value. The colors are nondescript, aqua, crimson, emerald, gray, indigo, khaki, magenta, orange, and quartz.
A fuse is a kind of thing.
A fuse has a color. Understand the color property as describing a fuse.
when play begins:
repeat with f running through fuses:
now the printed name of f is "[a color of f] colored fuse";
when play begins:
say "[fuse1].";
say "[the printed name of fuse1].";
say "[the printed name of fuse1 in title case]"
fuse1 is an aqua fuse.
fuse2 is a crimson fuse.
fuse3 is an emerald fuse.
fuse4 is a gray fuse.
fuse 5 is an indigo fuse.
fuse 6 is a khaki fuse.
fuse 7 is a magenta fuse.
fuse 8 is an orange fuse.
fuse 9 is a quartz fuse.
instead of jumping:
repeat with f running through fuses:
say "[f]" in title case;
say " ([f])";
say line break;
test me with "jump".
The now-deleted post from sepp2k identifies the root problem: The value of self is not being set correctly when the text from the third line in the example is being printed.
The actual generated I6 for the problem line looks something like: