Error loading script <file> in resource <name>
One of the script's files has a typo in it, so the server could not read it. Often a bad copy-paste or a half-finished edit.
Do this first
If you edited that file recently, undo your change and restart. If you did not, re-download the script.
What it means
A Lua syntax error. The file was found and read but is not valid Lua, so it was never compiled. The rest of the message is the parser's complaint, with a line number.
Common forms:
• unexpected symbol near '=' — usually = where == belongs, or a stray character
• '<eof>' expected near 'end' — one end too many
• 'end' expected (to close 'function' at line N) — one end too few
• unfinished string near — a quote never closed
• malformed number near — something like 1.2.3
What causes it
Ordered by how often it is the answer.
- 1
Unbalanced end
The most common Lua error. The parser reports where it NOTICED, which is often far below where the block actually opened.
- 2
A copy-paste that brought markup with it
Smart quotes from a website, backticks, or a diff marker left at the start of a line.
- 3
Assignment inside a condition
if x = 1 theninstead ofif x == 1 then. - 4
A merge conflict left in the file
<<<<<<< HEADis not valid Lua.
How to tell which one is yours
The line number is reliable for unfinished strings and unexpected symbols. For end-balance errors, trust the "(to close ... at line N)" part over the reported line.
Where to look
Open the file at the reported line and read UPWARD.
How to fix it
There is no generic fix, it is a typo. Check syntax before uploading:
luac -p client/main.lua
Still stuck on your own code?
This page is what this error usually means. Paste your console into Server Fixer and it will rank everything in it and tell you what to do first, and if you would rather not touch it, ORBIE can repair the script and hand the resource back ready to drop in.
bug_reportOpen Server Fixer