<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: RPScripts</title>
    <description>The latest articles on DEV Community by RPScripts (@rpscripts).</description>
    <link>https://dev.to/rpscripts</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4200793%2Fee056be4-b1a0-43d0-b65a-74fe98642115.png</url>
      <title>DEV Community: RPScripts</title>
      <link>https://dev.to/rpscripts</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rpscripts"/>
    <language>en</language>
    <item>
      <title>Debug a FiveM resource in three passes: configuration, code, then runtime</title>
      <dc:creator>RPScripts</dc:creator>
      <pubDate>Thu, 22 Oct 2026 15:49:17 +0000</pubDate>
      <link>https://dev.to/rpscripts/debug-a-fivem-resource-in-three-passes-configuration-code-then-runtime-j1k</link>
      <guid>https://dev.to/rpscripts/debug-a-fivem-resource-in-three-passes-configuration-code-then-runtime-j1k</guid>
      <description>&lt;p&gt;A resource can have valid Lua and still fail on a FiveM server. The server might not have discovered its folder, a dependency might be missing, or the code might expect a framework API your installation does not provide.&lt;/p&gt;

&lt;p&gt;Treat these as separate checks. It makes the next change easier to choose and the result easier to explain.&lt;/p&gt;

&lt;p&gt;Disclosure: this post is from RPScripts. The two browser tools linked below are ours and free to use. You can also follow the workflow manually.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pass 1: Check what the server is being asked to start
&lt;/h2&gt;

&lt;p&gt;Before editing code, write down the resource's exact folder name, required framework, dependencies and installation instructions. Compare that list with the resources actually installed on your test server.&lt;/p&gt;

&lt;p&gt;Look for an accidental extra directory level after extracting a ZIP. The resource folder should contain its manifest; a download folder containing another folder containing the manifest deserves a closer look. Check path casing when moving files between Windows and Linux.&lt;/p&gt;

&lt;p&gt;Read the active configuration, including any files it loads. Keep dependencies ahead of the resources that use them, according to the resource author's instructions. A line in server.cfg does not install a framework or create database tables.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://rpscripts.net/tools/server-cfg-generator/" rel="noopener noreferrer"&gt;RPScripts server.cfg Builder &amp;amp; Checker&lt;/a&gt; can help review an existing configuration or create an annotated starter. It runs in the browser. A clean report cannot confirm that your resource files, database or license are correct; those still need a local check. Use placeholders when sharing configuration for support.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pass 2: Inspect the resource before loading it into your server
&lt;/h2&gt;

&lt;p&gt;Separate syntax problems from integration problems. A parser can identify malformed Lua, but it cannot establish that a database exists or that a particular vehicle appears correctly in the game.&lt;/p&gt;

&lt;p&gt;For each resource, check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the manifest reference the scripts and UI files you actually shipped?&lt;/li&gt;
&lt;li&gt;Are client scripts and server scripts assigned to the intended side?&lt;/li&gt;
&lt;li&gt;Do required dependency names match the installed folders?&lt;/li&gt;
&lt;li&gt;Does an integration call an API supported by your installed framework version?&lt;/li&gt;
&lt;li&gt;Does server code validate permissions and derive important values itself, rather than trusting values supplied by a client?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href="https://rpscripts.net/tools/fivem-script-tester/" rel="noopener noreferrer"&gt;RPScripts FiveM Script Tester&lt;/a&gt; accepts a resource ZIP, a Lua file or pasted code. Its static checks and CfxLua sandbox run in the browser. The separate "Open in RPScripts AI" action sends files to your account, so distinguish that optional action from the local checks.&lt;/p&gt;

&lt;p&gt;Read the scope of the result. Simulated frameworks and events help isolate some failures, but game-world natives, OneSync and real database behaviour still require a real server. A successful simulation is one piece of evidence, not a deployment certificate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pass 3: Run one controlled test on a staging server
&lt;/h2&gt;

&lt;p&gt;Back up the resource and configuration first. Use a staging server with the dependencies and framework version you intend to deploy.&lt;/p&gt;

&lt;p&gt;The official &lt;a href="https://docs.fivem.net/docs/server-manual/server-commands/" rel="noopener noreferrer"&gt;Cfx server-command reference&lt;/a&gt; distinguishes these operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;refresh&lt;/code&gt; rescans resource manifests so newly added resources can be discovered.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;start resource_name&lt;/code&gt; starts a stopped resource.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ensure resource_name&lt;/code&gt; starts a stopped resource or restarts one that is already running.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last distinction matters when other resources depend on state held by the resource you restart. Use a controlled maintenance or staging workflow instead of repeatedly issuing commands on a busy server.&lt;/p&gt;

&lt;p&gt;Capture the first relevant server-console error and the corresponding client F8 output. Reproduce one action, change one cause, and repeat the same action. If it works, restart the staging server and test again: success after a manual start does not establish that a cold start has the right order.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep a short test record
&lt;/h2&gt;

&lt;p&gt;Record the artifact version, framework and dependency versions, the action you tried, the result and the relevant log lines. Redact credentials before sharing anything.&lt;/p&gt;

&lt;p&gt;Configuration checks answer whether the setup looks consistent. Resource checks answer what the code and simulation reveal. A staging test answers what happens in your actual environment. Keeping all three results makes support requests clearer and future updates easier to verify.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Your FiveM resource won't load? Check these fxmanifest.lua fields first</title>
      <dc:creator>RPScripts</dc:creator>
      <pubDate>Thu, 22 Oct 2026 15:38:51 +0000</pubDate>
      <link>https://dev.to/rpscripts/your-fivem-resource-wont-load-check-these-fxmanifestlua-fields-first-5dmf</link>
      <guid>https://dev.to/rpscripts/your-fivem-resource-wont-load-check-these-fxmanifestlua-fields-first-5dmf</guid>
      <description>&lt;p&gt;Every FiveM server owner has seen it: &lt;code&gt;ensure my_resource&lt;/code&gt; prints &lt;em&gt;Could not find resource&lt;/em&gt;, or the resource starts and then does nothing. Before you touch a single line of Lua, check the manifest — most of these failures live there, and the console error rarely points at the actual line.&lt;/p&gt;

&lt;p&gt;These are the six things I check first, in this order.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;code&gt;fx_version&lt;/code&gt; is missing or misspelled
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="n"&gt;fx_version&lt;/span&gt; &lt;span class="s1"&gt;'cerulean'&lt;/span&gt;
&lt;span class="n"&gt;game&lt;/span&gt; &lt;span class="s1"&gt;'gta5'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No &lt;code&gt;fx_version&lt;/code&gt;, no resource. It is not optional, it is not inferred, and a typo (&lt;code&gt;fx_verison&lt;/code&gt;) gives you the same generic failure as a missing file. &lt;code&gt;cerulean&lt;/code&gt; is the current value; older manifests use &lt;code&gt;adamant&lt;/code&gt; or &lt;code&gt;bodacious&lt;/code&gt; and still load, but there is no reason to start a new resource on a retired version.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The &lt;code&gt;game&lt;/code&gt; line is absent
&lt;/h2&gt;

&lt;p&gt;Without &lt;code&gt;game 'gta5'&lt;/code&gt; the resource may load and then behave strangely: natives resolve, entities spawn, and nothing works the way it does in every tutorial you followed. Cheap to check, expensive to debug.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Path casing in &lt;code&gt;client_scripts&lt;/code&gt; and &lt;code&gt;server_scripts&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The classic "works on my machine". You develop on Windows, where &lt;code&gt;client/Client.lua&lt;/code&gt; and &lt;code&gt;client/client.lua&lt;/code&gt; are the same file, and deploy to a Linux host where they are two different paths and only one exists.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="n"&gt;client_scripts&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;'client/main.lua'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;-- must match the real filename exactly&lt;/span&gt;
    &lt;span class="s1"&gt;'client/ui.lua'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same rule for &lt;code&gt;shared_scripts&lt;/code&gt;, &lt;code&gt;files&lt;/code&gt; and &lt;code&gt;server_scripts&lt;/code&gt;. If a resource loads but one feature silently never runs, suspect casing before logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;code&gt;lua54&lt;/code&gt; is still in the manifest
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="n"&gt;lua54&lt;/span&gt; &lt;span class="s1"&gt;'yes'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This flag does nothing today — every FiveM Lua script runs on Lua 5.4 and the manifest documentation marks the opt-in as deprecated. It is not the bug itself, it is a fossil: a manifest nobody has revisited. Where it shows up, look for the neighbours of an old setup — a &lt;code&gt;__resource.lua&lt;/code&gt; that was renamed instead of converted, &lt;code&gt;node_version&lt;/code&gt; values that no longer exist, or code that still assumes Lua 5.3 number semantics.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. &lt;code&gt;dependencies&lt;/code&gt; instead of hoping for the best
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;'ox_lib'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'oxmysql'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without it, your resource starts in whatever order &lt;code&gt;server.cfg&lt;/code&gt; happens to load, and every call into a dependency that has not started yet throws at runtime. Declaring dependencies makes FiveM refuse the start with a clear message instead of letting you debug a nil export at 2 a.m.&lt;/p&gt;

&lt;p&gt;Two gotchas: the name must match the dependency's folder, not its display name, and an optional integration should not be listed — declare only what the resource cannot run without.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. &lt;code&gt;escrow_ignore&lt;/code&gt; when the resource is sold
&lt;/h2&gt;

&lt;p&gt;If the resource is protected with escrow, any file a customer is supposed to edit — &lt;code&gt;config.lua&lt;/code&gt;, locale files, framework bridges — has to be listed in &lt;code&gt;escrow_ignore&lt;/code&gt;. Miss one and the customer edits a file that never executes, reports a bug, and nobody can reproduce it because the developer's own copy is unencrypted.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two-minute pre-flight
&lt;/h2&gt;

&lt;p&gt;Before every restart:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;fxmanifest.lua&lt;/code&gt; sits at the resource root, and is not secretly &lt;code&gt;fxmanifest.lua.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fx_version&lt;/code&gt; and &lt;code&gt;game&lt;/code&gt; are present and spelled correctly.&lt;/li&gt;
&lt;li&gt;Every path in &lt;code&gt;client_scripts&lt;/code&gt;, &lt;code&gt;server_scripts&lt;/code&gt;, &lt;code&gt;shared_scripts&lt;/code&gt; and &lt;code&gt;files&lt;/code&gt; exists with exact casing.&lt;/li&gt;
&lt;li&gt;A glob in &lt;code&gt;files&lt;/code&gt; matches at least one file — an empty glob is silent.&lt;/li&gt;
&lt;li&gt;Dependencies are declared by folder name, not assumed.&lt;/li&gt;
&lt;li&gt;Escrow-protected resources list every editable file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I got tired of checking this by hand, so I wrote a dependency-free linter that reads manifest syntax as text and never executes Lua: &lt;a href="https://github.com/Livvux/fivem-fxmanifest-lint" rel="noopener noreferrer"&gt;fivem-fxmanifest-lint&lt;/a&gt;. Python 3.10+, no third-party packages, no network access, non-zero exit code for CI.&lt;/p&gt;

&lt;p&gt;For a quick check in the browser without cloning anything, there is a hosted &lt;a href="https://rpscripts.net/tools/fxmanifest-generator/" rel="noopener noreferrer"&gt;fxmanifest.lua validator and generator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Either way: fix the manifest first. Most of the time, the Lua was fine.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>lua</category>
      <category>fivem</category>
    </item>
  </channel>
</rss>
