ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
Luacrash

Error parsing script @resource/file.lua

Also seen as: Error parsing script error loading script lua syntax error FiveM

What causes it

A Lua file has a syntax error, so FiveM can't parse it. Almost always a missing end, a missing comma or quote, or an unclosed bracket — very often introduced when editing a config file.

How to fix it

Open the named file and find the syntax mistake — the error usually gives a line number.

  1. Read the file and line number in the error.
  2. Look for a missing end, comma, quote, or bracket around that line.
  3. If you just edited a config, revert your change and re-edit carefully — a single stray character breaks the whole file.
  4. Use a Lua syntax checker or a code editor with Lua linting to spot it.

Related errors

Related guides

Still stuck? We can help.

Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.