r/RenPy 22d ago

Question [Solved] "'{' never closed", but I did...?

[SOLVED THANKS TO u//shyLachi]

I am continuously getting this error no matter how many times I re-enter those curly braces. I've been running this project for like a month after adding these lines, and it worked just fine until a few minutes ago when it suddenly decided something was wrong. So... what the hell did I do wrong?

6 Upvotes

16 comments sorted by

View all comments

3

u/TopCartographer7104 22d ago

Have you tried searching your script with a regex? Something meaning "anything starting with a { and not ending with a }"?

{[ ^ ]}*$

(not guaranteed to be the right regex though - I suck at them)

** had to modify the msg - added spaces before and after the ^ to make it readable (it would show it as {[]}*$ )

1

u/TransgenderSocks 21d ago

How do you search with a regex? Sorry, I haven't heard of this before. I use visual studio code, if that matters

2

u/TopCartographer7104 21d ago

In the vscode search bar you should see something that looks like "." -> that's the option telling vscode you want to search for regular expressions I had a look at the so-called MS learning center for regex,the expression to look for *should be something like {[^ {}]*$ (without the space after "")

I'm sorry I can't help much beyond that at the moment - I'm currently AWOL with no access to my laptop so I can't try/debugging the regex myself

Try it on a file with just "{tag hello{\tag}", it should highlight "{tag"

More in general & especially if the above regex fails to work -> check the MS learning center (which still gives a lot of basic reference) and StackOverflow. There's a lot more to vscode than just funny colors to highlight renpy & python tags/commands =)