fxmanifest shared_script vs shared_scripts (2026)

Published on

A practical guide to shared_script versus shared_scripts in FiveM fxmanifest.lua, with correct syntax, load-order tips, and debugging steps for missing exports or nil globals.

Many FiveM errors come from one tiny manifest typo: using the wrong shared declaration or wrong data type.

Quick answer

  • shared_script is for one script.
  • shared_scripts is for multiple scripts.

Both are valid. The key is passing the right value shape.

Correct examples

Single file

fx_version 'cerulean'
game 'gta5'

shared_script 'config.lua'

Multiple files

fx_version 'cerulean'
game 'gta5'

shared_scripts {
  'config.lua',
  'locales/en.lua',
  'shared/utils.lua'
}

Common failure patterns

Wrong type for plural key

-- Wrong
shared_scripts 'config.lua'

Some resources parse this loosely, others fail in weird ways. Use a table for plural.

Wrong load order

If shared/utils.lua defines a helper used by client/main.lua, load shared/utils.lua first.

shared_scripts {
  'shared/utils.lua',
  'config.lua'
}

client_scripts {
  'client/main.lua'
}

Mixing deprecated manifest patterns

Use fxmanifest.lua with modern declarations. If you still ship old styles from legacy resources, standardize to avoid startup surprises.

Debug checklist for nil globals or missing exports

  • Confirm file path and case sensitivity.
  • Confirm script appears in server console resource load output.
  • Check load order in manifest.
  • Restart resource after edits: ensure your_resource.
  • Look for syntax errors inside shared files.

Practical advice for bigger RP stacks

  • Keep shared code minimal and deterministic.
  • Move heavy logic to server side.
  • Avoid side effects in shared files at import time.
  • Add one shared version constant for quick compatibility checks.

If you are cleaning old resources, pair this with our fxmanifest resource guide and FiveM server setup guide.

Final recommendation

Use shared_script for one file and shared_scripts { ... } for many files. Keep load order explicit. Most "random" runtime errors around manifests are not random at all, they are manifest structure issues.


Legal Notice

Legal Notice & Disclaimer: This article constitutes an independent, factual comparative review and critical analysis for educational purposes only. Space-Node is not affiliated with, endorsed by, or sponsored by any hosting provider mentioned herein. All brand names, logos, and trademarks referenced are the registered intellectual property of their respective owners and are used solely for identification and factual reference.

Fair Use & Review Rights: This review is protected commentary, comparison, and criticism. It is based on publicly available information, official pages where available, published documentation, and general hosting engineering analysis. Where hands-on testing is not explicitly stated in the article, no private benchmark or internal infrastructure access is implied. This constitutes lawful comparative review and criticism protected under fair use doctrine.

Factual Accuracy: Specific plan claims are based on public information available at the time of writing. Specifications, pricing, and service features can change, so readers should verify current details on the provider's official website before purchasing. We make no false or defamatory statements; criticism is limited to documented facts, clearly labeled opinion, or general hosting guidance.

No Consumer Confusion: This article makes clear that Space-Node offers distinct, independently-developed hosting infrastructure. We explicitly differentiate our services, pricing, and technical specifications. No reader could reasonably be confused about service provider identity.

Right to Comparative Advertising: Space-Node reserves the right to publish factual comparative information about competing services. This is a recognized right in consumer protection law and advertising standards. Accurate comparative reviews cannot constitute trademark violation, defamation, or unfair competition.

Limitation of Liability: Space-Node makes no warranty regarding third-party services reviewed. Readers are responsible for verifying information independently before purchasing. Space-Node disclaims liability for third-party service changes, outages, or policy modifications.

Space-Node Services: For Space-Node's own managed hosting solutions, visit Minecraft hosting or VPS hosting.

Launch Your VPS Today

Get started with professional VPS hosting powered by enterprise hardware. Instant deployment and 12/7 support included.