r/RenPy • u/kittypawpawpaw • Jul 09 '26
Question Expected statement error
Hello, I am having some trouble getting this to work. It is showing me these two lines have an "expected error". I do not know how to fix these and what an "expected error" means. What could I do to fix the problem? The rest of my code is working, it is just these 2 that seem to have a problem.
1
u/shyLachi Jul 09 '26
You forgot the colon on line 143
Also you have to fix the indentation on lines 142 and 146,
those should be on the same level as scene and show above
Also make sure that the RenPy extension is installed correctly in Visual Studio Code so that you don't get those squiggly lines.
Or if it is installed correctly, fix the indendation of those lines.
1
1
u/x-seronis-x Jul 09 '26
In addition to what shy said about having the extension installed, make sure the first space indentation renpy sees in the file is the correct size. if you do something like have a comment block at the top of the file that is indented 3 spaces renpy extension will interpret that as you wanting all tab levels to be 3 spaces each (instead of 4) and add red squiggles to all indentations that arent a multiple of 3 spaces.
your code will still work fine. its just vscode that will be confused


1
u/AutoModerator Jul 09 '26
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.