Ask coding questions

← Back to all posts
"Unable to format" to auto-format
google2

I clicked the auto-format code button and the entire contents of the file disappeared and was replaced by
Unable to format /tmp/format_file713564743:
[string "isCodeValid"]:5: '}' expected near ')'

And it is now impossible to restore the contents of the file.
It seems to me that it should not work like this

Voters
google2
Comments
hotnewtop
SixBeeps

Verrrry strange. Definitely a bug. For now, just go back into the file's history and restore it to an older version.

Also, what steps did you take before auto-formatting? I haven't used Lua's autoformatter, so it could be an error with that.

EDIT: I just tried the autoformatter on some small-scale code and it seemed to work just fine. Maybe there was something specifically with your code that triggered it, but it's hard to say.

ErrorbotTHE2nd

oof, I can't understand comments...