Wonky Fonts

Bluevoss
Working on a bit of code (skeleton for now) where you will enter a "room" that actually serves two purposes (which is originally determined by "path"). In later sections, the variable "lastSpecial" (originally set to 0 at game start) will be set to the path you discovered. If you come in that way again, you'll get a simple statement that you've been here before. I don't want to use the "if seen" deal, because in following sections, the same section will be used, just with a different path. It is anticipated that this room will eventually have a lot of paths. I want you to random down different paths, but not do the same path back to back).

For testing, you'll note I've overridden path to always be 1, to test the second-time-cant-do-it-again bit.

Everything works fine, except that on the first time through (when you get the "[[continue]](room6a)" part, THAT piece of display comes back in a light blue box (if simply "run") and in an odd font (if "built"). So, I've counted brackets, checked spacing, all that. For the life of me, I can't understand why that final line (which works perfectly find) is "indicated" with the font and box. Ideas?


[[room6]]:
@dec minutes 10
@set done = 0

var path = Math.ceil(Math.random() * 2);
squiffy.set("path",path);
squiffy.set("path",1); //TESTING MOD TO FORCE PATH

if (squiffy.get("lastSpecial") == squiffy.get("path"))
{squiffy.set("path",0);}

{if path=0:

You are in a dark stone chamber. You realize that you've been here before

[[So move on.]](central hall)
}

{else:
{if path=1:
<img src="room1.gif" alt="room1" height=200 width=200>

This is the description of room 1. Possible treasure
}

{if path=2:
<img src="room2.gif" alt="room2" height=200 width=261>

This is the description of room two. Possible traps
}
[[continue]](room6a)
}

Dennis Carlyle
When I run this in the Squiffy editor, I notice that the non-Javascript code is getting JS color coding. The editor seems to easily get confused between which is which, so I always try to be careful that JS code looks properly color-tagged, by fiddling with indents + line spaces.

You can also see parts of the Squiffy code in your example are greyed out.

When I remove or reduce the indents from the Squiffy code above, so there's no color tagging, and nothing is greyed out, the output looks fine in 'run' and 'build'.

Bluevoss
Thanks. I took out all my spacing and that seemed to fix the issue. Don't know what I got in where, but it was driving me nuts.

Lifesaver!

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums