Dependency Conflicts & Missing Exports
Dependency issues typically occur when required support libraries are outdated, uncompiled, or started in an incorrect boot order in server.cfg.
1. attempt to call a nil value (field 'registerContext' / 'notify' / 'showContext')
Section titled “1. attempt to call a nil value (field 'registerContext' / 'notify' / 'showContext')”Cause: ox_lib is missing, stopped, or downloaded directly from the GitHub source repository rather than downloading the pre-built release package.
Resolution:
- Download the latest official built release of
ox_libfrom GitHub Releases. - Ensure you download
ox_lib.zip(which includes the compiled Web UI / webview files), not the raw source code zip. - Place
ox_libin yourresources/directory and ensure it is started near the very top ofserver.cfg:ensure ox_lib
2. Target Interactions Not Showing (Target system not detected)
Section titled “2. Target Interactions Not Showing (Target system not detected)”Cause: The script was unable to locate ox_target or qb-target, or the target system was started after the Mountain Mods resource.
Resolution:
- In
config.lua, ensureConfig.Targetmatches your active target resource:-- If running ox_targetConfig.Target = "ox_target"-- If running qb-targetConfig.Target = "qb-target"-- If running without any target system (Standalone prompt/3D Text)Config.Target = "drawtext" -- or "textui" - Verify boot order in
server.cfg:ensure ox_target # (or qb-target)ensure mtm-matrixborden
3. Inventory Item Errors (Item not found in database / items table)
Section titled “3. Inventory Item Errors (Item not found in database / items table)”Cause: The script is attempting to use an item that has not been defined in your inventory configuration.
Resolution:
Ensure the item name in config.lua exactly matches your inventory definition:
['matrix_remote'] = { label = 'Matrix Controller', weight = 500, stack = false, close = true, description = 'Wireless electronic controller for road matrix signs.'},['matrix_remote'] = { name = 'matrix_remote', label = 'Matrix Controller', weight = 500, type = 'item', image = 'matrix_remote.png', unique = true, useable = true, shouldClose = true},4. Screenshot Capture Failures (screenshot-basic Issues)
Section titled “4. Screenshot Capture Failures (screenshot-basic Issues)”Cause: For scripts capturing screen buffers or audit snapshots, screenshot-basic may fail if the client has NUI GPU acceleration disabled or if the Discord Webhook URL is invalid.
Resolution:
- Ensure
screenshot-basicis active:ensure screenshot-basic - Verify Discord Webhook URL:
Ensure
Config.DiscordWebhookcontains a valid, active webhook URL with full posting permissions. - Fallback Mode:
If you do not wish to use screenshot uploads, set
Config.PhotoStorageMode = "none"inconfig.lua(if supported by the resource) to record only textual logs.
5. Summary of Recommended Boot Order
Section titled “5. Summary of Recommended Boot Order”# Core Enginesensure oxmysqlensure ox_lib
# Framework (Optional - Skip if Standalone)ensure qb-core # or es_extended / qbx_core / vrp / ox_core
# Interactions & Inventoryensure ox_target # or qb-targetensure ox_inventory # or ps-inventory
# Mountain Mods Suiteensure MTM-COREensure mtm-matrixbordenensure mtm-flessenautomaatensure mtm-taxi