Skip to main content

unexpected symbol near ...

❌ Error

unexpected symbol near 'xyz'

📍 Context

Lua cannot parse your code because of a typo, wrong punctuation, or invalid symbol. Common with copy-pasted code or missing quotes/brackets.

✅ Solution

  • Check the line number indicated in the error message.
  • Look for missing or extra symbols: ,, ), }, ', ".
  • Use an editor with Lua syntax highlighting to detect issues.

ℹ️ Additional Information

  • Can occur clientside or serverside.
  • Step-by-step comment out sections to isolate the syntax problem.