How to fix "syntax error near <\1>" in FiveM

Updated 29 Oct 2026 · 1 min read

On this page
  1. Why it happens
  2. Fix 1: download fresh and upload in binary mode
  3. Fix 2: update your server artifacts
  4. Fix 3: don't edit escrowed files
  5. Related

syntax error near <\1> shows up when the server tries to read an escrowed (encrypted) script file as plain Lua and fails. The <\1> is a binary byte where the parser expected text. In practice it means the file is corrupted or the server can't decrypt it.

[ERROR] Failed to load script: syntax error near <\1>

Why it happens

  • The upload corrupted the files. FTP clients in ASCII/auto mode (FileZilla's default for some file types) rewrite line endings and break escrowed files. This is the most common cause.
  • Outdated server artifacts. Very old FXServer builds can't load current escrow files.
  • A copy from the wrong place. Files edited, re-zipped or taken from someone else's server won't decrypt.

Fix 1: download fresh and upload in binary mode

  1. Download the script again from Granted Assets on portal.cfx.re.
  2. Delete the old resource folder on your server completely (back up your config first).
  3. Upload the new folder with your FTP client set to binary transfer mode. In FileZilla: Transfer → Transfer type → Binary.
  4. Restart the server.

Uploading the zip and extracting it on the server avoids the problem entirely, if your host has a file manager that can unzip.

Fix 2: update your server artifacts

Update FXServer to a recent recommended build from the official artifacts page, or use your host's "update artifacts" option, then restart.

Fix 3: don't edit escrowed files

Only the open files (configs, locales, bridge/editable files) can be changed. Opening an escrowed .lua file in an editor and saving it, even without changes, can break it. Put your changes in the config files instead.

Still getting the error after a clean re-upload? Send us the console output on Discord.

Read the guides

Join 3,025 server owners on Discord

1,015 online now · Ask before you buy, get support after.

Join the Discord