I ran into this problem today with some weird code about bolded text. I have a big moving apparatus and it involves some nested ‘say’ conditions.
If I have this code:
Every turn:
say "[bold type]hi[roman type][paragraph break]";
let boldtext be "[bold type]hi[roman type][paragraph break]";
say boldtext;
say "[boldtext]";
let nestedtext be "[boldtext]";
say nestedtext;
say "[nestedtext]";
Then the output is:
hi
hi
hi
hi
hi
>
(i.e., the first three are bold, the last two are not)
Does anyone know why the bold only appears on the first three 'hi’s and not the last two?
Edit: In my situation, I was trying to add some stuff to a list. I got around this problem by making a ‘list’ manually (coding in the commas and the ‘and’), so now I don’t really need an answer to this, but I do find it confusing and wonder what’s causing this. I’m in 6M62.
This is an example of code I wanted to work:
To say galexit:
say "You can go ";
let L be a list of text;
repeat with way running through directions:
if way is inside:
next;
if way is outside:
next;
if way is down:
next;
let place be the room way from the location;
let placename be "[place]";
if place is a room:
add "[bold type][way][roman type] to the [placename in lower case]" to L;
say L;
The bolds don’t show up for me. If I manually ‘say’ things instead of adding them to the list, the bold comes back. But it doesn’t matter if this whole thing is a ‘to say’ phrase like I have it or a straight up 'every turn: say" phrase.
This is what I ended up using. It’s tedious, but works, I only need this in one room, and I prefer to order the directions in this order because it’s a rotating room (I don’t know what order inform defaults to but it’s not this one):
To say galexit:
say "You can go ";
let L be a list of text;
let place be the room north from the location;
let placename be "[place]";
if place is a room:
say "[boldnorth] to the [placename in lower case], " ;
let place be the room northeast from the location;
let placename be "[place]";
if place is a room:
say "[boldnortheast] to the [placename in lower case], " ;
let place be the room east from the location;
let placename be "[place]";
if place is a room:
say "[boldeast] to the [placename in lower case], " ;
let place be the room southeast from the location;
let placename be "[place]";
if place is a room:
say "[boldsoutheast] to the [placename in lower case], " ;
let place be the room south from the location;
let placename be "[place]";
if place is a room:
say "[boldsouth] to the [placename in lower case], " ;
let place be the room southwest from the location;
let placename be "[place]";
if place is a room:
say "[boldsouthwest] to the [placename in lower case], " ;
let place be the room west from the location;
let placename be "[place]";
if place is a room:
say "[boldwest] to the [placename in lower case], " ;
let place be the room northwest from the location;
let placename be "[place]";
if place is a room:
say "and [boldnorthwest] to the [placename in lower case]" ;
(here [boldnorth] and so on are short for [bold type]north[roman type]).
This also works (for a different area):
To say energydesc:
let L be a list of text;
let place be the room north from the location;
if place is in energy-region:
add "[boldnorth]" to L;
let place be the room northeast from the location;
if place is in energy-region:
add "[boldnortheast]" to L;
let place be the room east from the location;
if place is in energy-region:
add "[boldeast]" to L;
let place be the room southeast from the location;
if place is in energy-region:
add "[boldsoutheast]" to L;
let place be the room south from the location;
if place is in energy-region:
add "[boldsouth]" to L;
let place be the room southwest from the location;
if place is in energy-region:
add "[boldsouthwest]" to L;
let place be the room west from the location;
if place is in energy-region:
add "[boldwest]" to L;
let place be the room northwest from the location;
if place is in energy-region:
add "[boldnorthwest]" to L;
say L;
if the location is south-energy:
say ". You can also return to the statue to the [boldsouth]"