unexpected symbol near '<something>'
A syntax error stops your resource from loading. We teach you how to read the message and find the brace, parenthesis or comma that's extra or missing.
1 min read
The problem
When starting the resource, the console shows "unexpected symbol near '...'" and the script doesn't load.
The cause
It's a Lua syntax error: a missing or extra `end`, an unclosed parenthesis or brace, an extra comma, or an unclosed quote.
The solution
The message gives you the file and the approximate line. Look right BEFORE the symbol it mentions:
lua
-- Missing the function's closing 'end'
local function dar()
print('hello')
-- end <- this was missing
-- Or an unclosed parenthesis
if (jugador and dinero then -- missing the ')'
-- ...
endStep by step
- 1.Open the file at the line the console indicates.
- 2.Make sure every `function`, `if`, `for` and `while` has its `end`.
- 3.Check parentheses and braces are matched, and quotes are closed.
- 4.Use an editor with syntax highlighting (VS Code) or run it through the AI tool to locate it instantly.
Related guides
Keep learning
Last updated: 2026-06-17. Crxative-M is not affiliated with Cfx.re or Rockstar Games.
