How to see Coding Issues in editor?

Hi everyone,

When switching over to the new Twine 2.4.0, I’m no longer able to see basic coding visual aids. Sorry if I don’t know the technical term for it, but I’ve included a picture of pre-2.4.0 (which includes BLUE highlighting), 2.4.0 shows zero highlighting and only text. I can no longer see if I’ve completed parenthesis or used the correctly name variable upon clicking. Is there a way to turn this basic code-checking back on or is Harlowe no longer supported in this way? I love the new editor, but this missing functionality makes it near impossible to use.

If anyone is like WHY I’m using Harlowe 1.2.4, I’ve been using TWINE for several years now to make a board game and locked the language down years ago. Go buy a copy of My Father’s Work, lol.

Twine Version: 2.4.0 (web)
Story Format: Harlowe 1.2.4

1 Like

Couldn’t add this to the topic above (new user), so including a picture of the current version on TWINE and what it displays here. Thanks!

Pre Twine v2.4.0 there was no official method for adding Story Format specific features like Syntax Highlighting or custom Toolbars to the GUI application.

So a hack was done to the Code Editor widget being used by the Passage Editor window to expose the internals of that widget and Harlowe was modified to make use of that hack to add these types of features.

Twine v.2.4.x was rewritten using a different set of frameworks, and a formal method of implementing features like those mentioned previously was added for the usage of the Story Format Developers.

Harlowe v3.x was updated to use this formal method, however older discontinued series of Harlowe (like 1.x and 2.x) were not. And this is why the v1,2,4 of Harlowe you are using no longer has those features in Twine v2.4.x

Thanks for the explanation. That sucks for me, mostly because it requires me to have to use an older version. It’s confusing though because Harlowe 3 IS what it is set as currently in that example, but nothing is different color. You would think SOMETHING would be noted or highlighted.

I’ve downloaded the last version before 2.4.0. and I guess for an expansion I’ll have to have the writers do the same. I love the UNDO button and I’m lucky that the timing of this revision happened AFTER the game’s release, but I’m not sure exactly what to do for the future.

To test syntax highlighting in Twine 2.4.x I did the following:

  1. Opened a copy of the Web-browser release of the Twine v2.4.1 application, then created a new project and changed its Story Format to Harlowe v3.3.1

  2. Typed the following example code into the initial Passage, which was coloured as I finished each relevant part…

(set: $var to "value")
(if: $var is "value")[
	<!-- do something -->
  1. Use the applications Preferences to test the colouring for each available Theme, and each showed the code with syntax highlighting.

Are you sure you have Harlowe 3.x selected as your project’s Story Format when you tested the v2.4.x series of the Twine application?
Which release of the application were you testing (web-browser based or desktop install)?
Which Operating System (or Web-browser in the case of the web-browser based release) are you using?
Which of the application’s Themes are you using?

1 Like

Okay, I found it! I was able to replicate some code in a new story with syntax highlighting showing, but couldn’t get it to work for the older stories.

But, Harlowe 3 isn’t selected in the Story Format tab, it’s selected in the INFO tab. That’s certainly unintuitive, but hey I can now get multiple colors to appear. This should be usable, but I’ll have to confirm with the devs. Not sure if any basic code in the language has changed from 1.2.4 to 3.x, hopefully it’s just additions.

For reference, web-browser version (newest), Chrome, Windows 10, Dark theme.