I’m having trouble with…
The error I’m getting is:…
My code looks like this:
So. When doing things like *page_break. Does thiat maintain the indentation of everything else? I think it does, just not totally sure. I know things like *goto and that do, but not quite sure with page_break.
I’d recommend going over some of the basic tutorials to understand how indentation works.
If you’re asking if the editor will keep everything on the same indentation level for each new line, then it really depends on the editor.
CSIDE will keep the same indentation level for every new line except for the commands which demand an indentation increase, like *if, *elseif, *else, *choice, *fake_choice, *stat_chart and *scene_list. CSIDE will decrease an indentation level for commands such as *finish, *ending, *goto (and its derivatives).
I’m not sure if I forgot any.
If you aren’t already using it I HIGHLY recommend CSIDE for writing your code. It made understanding Choice Script code layout so much easier and more intuitive for me and makes testing your game quickly super easy.
I think the question is, does *page_break need to be at the same indentation level as the text before it.
So if you were at a choice that was 3 levels deep, would *page_break also need to be at that indentation, or could it be at the main body?
Unfortunately, cside doesn’t work very well with screen readers, so its not an option for every user of choice script. I think *page_break does need to be at the correct indentation, but honestly haven’t ever needed to use it so am unsure.
Is there any extension on vscode that could help him ?
There is an extension on the VS Code to work with ChoiceScript developed by @Sargent. It’s pretty neat. I don’t know how friendly VS Code is to screenreaders.
This really depends on what you’re going for, but generally speaking, yes. Unless there’s a need to indent or dedent (because of the commands I mentioned above on the other reply), then every new line needs to have the same indentation level, or you risk breaking the flow of the script, and not all of these mistakes will be caught by autotest.
Vscode and the choice script extension are both incredibly useful, and work very well with screen readers.
I’m glad to hear that the extension plays nicely with screen readers! A lot of that is down to using the standard hooks VS Code provides for language extension writers.
For anyone looking to work with VS Code and screen readers, the docs have suggestions, including what screenreaders they’ve tested it with, and, for Windows, a recommended extension to make it play better with NVDA.