Syntax Error Near <\1>
Why a FiveM escrow script fails with syntax error near <\1>, and how to fix it: GTA V Enhanced servers, a missing .fxap file, damaged uploads and outdated artifacts.
The console shows something like this when the resource starts:
Error loading buffer: @stg-example/server/main.lua:1: syntax error near '<\1>'
Failed to load server/main.lua in resource stg-example.Escrow files are encrypted. This error means the server is reading an encrypted file as plain Lua instead of decrypting it, so the problem is in how the server loads the file, not in the script code. Check these in order.
Your server runs on GTA V Enhanced
Asset Escrow is not available yet on FiveM for GTA V Enhanced, so no escrow protected script can load there, from any creator. If all your escrow scripts fail, this is the most likely reason.
Run your server on Legacy until Cfx.re adds support. You can check the current status in the Legacy vs Enhanced list.
The .fxap file is missing
Every escrow script has a hidden .fxap file next to fxmanifest.lua, and the server needs it to decrypt the files. FTP clients and host file managers can skip it.
Turn on hidden files and check that it is in the resource folder on the server itself, not only on your PC.
The upload damaged the files
FTP clients can corrupt encrypted files during transfer. FileZilla is the one reported most often.
Delete the resource folder on the server.
Download the script again from the Cfx.re portal.
Upload the zip and extract it on the server. If you can not extract there, use WinSCP in binary mode.
Restart the server.
Your server artifacts are outdated
Old artifacts can not read escrow files correctly. Update to the latest recommended Windows or Linux build and restart the server.
Still having trouble?
Open a ticket on our Discord. Our team answers around 15 hours a day.