Troubleshooting
Common issues and fixes for Oxide Vending.
Common problems with oxide-vending and how to fix them. When something goes wrong, check two places: the server console (the window your server runs in) and the F8 console in-game (press F8).
Database problems
Errors mentioning vending_ tables
If the server console shows errors about missing vending_businesses, vending_machines, or similar tables, the database setup step was skipped or didn't finish.
To check whether the tables exist, run this in your database tool (HeidiSQL, phpMyAdmin, etc.):
SHOW TABLES LIKE 'vending_%';You should see 13 tables. If you don't, run the file sql/install.sql against your database (it's safe to run again).
"WARNING: Could not load progression data" on startup
The exact message is:
[oxide-vending] WARNING: Could not load progression data. Have you run sql/install.sql?It means the vending_progression and vending_milestones tables are missing. Run sql/install.sql as above.
Startup problems
The resource won't start
First make sure your server.cfg starts things in this order:
ensure ox_lib
ensure oxmysql
ensure o-link
ensure oxide-vendingThen check:
- you didn't accidentally change or delete
fxmanifest.lua - if you edited any config file, the edit didn't break it — a missing comma or quote will stop the whole resource from loading, and the server console will show a red error with the file name and line number
Errors saying "attempt to index a nil value"
This almost always means o-link isn't doing its job. Common causes:
o-linkisn't started, or starts afteroxide-vendingo-linkisn't set up for your framework, so it can't find your inventory, money, or targeting systems- players aren't being marked as "loaded" by your framework, so the resource never hears about them
Check the o-link documentation for your framework setup.
Money and balance problems
Registration works, but deposits or withdrawals fail
The business keeps its own balance, and deposits/withdrawals move money to and from the player's personal bank account.
Work through these:
- Run
/vendingdebug bank <businessId>(or in-game with no ID to use your own business) to see what the server thinks the balance is. - Compare against the database:
SELECT business_id, balance FROM vending_businesses WHERE business_id = 'your-id'; - For deposits: does the player actually have that much in their bank account?
- Does the player have the
depositorwithdrawpermission? Only owners can withdraw by default.
Revenue seems to be missing
Money from sales sits in two places: each machine holds its own takings until collected, and collected money goes to the business balance. Check the machine first — the owner may simply not have collected yet.
If the database rows look right but the dashboard shows stale numbers, restart the resource — the dashboard reads from the server's memory, which is rebuilt on start.
Machine problems
The placement preview doesn't appear
- The player can't place from inside a vehicle — get out first.
- Check the machine type still exists in
config/machines.lua. - If you changed a machine's prop model, make sure the model name is a real GTA prop — a typo here makes the preview silently fail.
- Set
Config.Debug = trueand try again; the F8 console will say what's wrong.
"This location is not suitable" / placement keeps being refused
A spot is refused when:
- the business is at its machine limit for its level
- the machine type isn't unlocked yet
- the spot is inside a
Config.BlockedZonesarea - it's too close to another machine (
MinDistanceBetweenMachines) - it's too far from the player (
MaxDistanceFromPlayer)
Players can't interact with a machine
- Make sure a targeting resource (like
ox_target) is running — interactions go through it viao-link. - Check the machine isn't
brokenorinactive— broken machines need a repair first. - Try standing closer (
Config.Interaction.TargetDistanceis 2.5 meters by default). - Another resource's interaction zone may be sitting on top of the machine and swallowing the click.
Warehouse and pickup problems
The warehouse code doesn't work
- Confirm the business actually owns a warehouse:
SELECT * FROM vending_warehouses WHERE business_id = 'your-id'; - The code must be exactly the configured length (4 digits by default).
- After 5 wrong attempts, the player is locked out for 5 minutes — "Too many failed attempts. Try again in 5 minutes." means wait, not that the code is wrong.
A player is stuck "inside" the warehouse / can't see anyone
Warehouses put players in their own private instance. If someone gets stuck there:
- have them reconnect — that's usually enough
- if it keeps happening, an admin can check the player's routing bucket on the server and move them back to bucket
0
Warehouse storage looks wrong
Check what the database has:
SELECT * FROM vending_business_inventory WHERE business_id = 'your-id';Then confirm:
- the stored item names still exist in your inventory system (if you renamed or removed an item, stored copies of it become unusable)
- the warehouse isn't simply full —
MaxCapacity(total items) orMaxItemTypes(different items) may be blocking new deposits - there are no database errors in the server console when depositing or withdrawing
Wholesale boxes never appear on the pallet
- Check
Config.PickupLocation.Enabled = true. - Check whether the order made it to the database:
SELECT * FROM vending_pickup_boxes; - Remember deliveries take time — 5 minutes by default (
Config.Wholesale.DeliveryTime). - If you moved the pallet or changed the prop models, double-check the coordinates and model names.
- Run
/vendingdebug boxes 4in-game to spawn test boxes — if those appear, the visual side is fine and the problem is with the orders.
NPC sales problems
Machines never sell anything on their own
- Check
Config.NPCSales.Enabled = true(or run/vendingnpc toggle). - Run
/vendingnpc stats— it shows whether the system is running and how many sales it has made. - Run
/vendingnpc forceto trigger a high-chance test round. - The machine must be
active(not broken or switched off) and have stock. WithAvoidLastItemon, a machine with only 1 of an item won't sell it.
NPC sales feel too slow
That may be by design. Sales depend on machine type, location, time of day, pricing, stock variety, and nearby competition — an overpriced electronics machine in the countryside will barely sell. To speed everything up globally, raise BaseChancePerTick or RevenueMultiplier in config/npc_sales.lua. See NPC Sales for how each factor works.
The time of day seems wrong
If oxide-weather is installed and running, NPC sales follow the in-game clock. Without it, they follow real-world server time — so your players may see "lunch rush" sales at real-world noon rather than in-game noon. Both are normal; install oxide-weather if you want in-game time.
Level problems
A business isn't leveling up
Leveling needs both enough XP and enough lifetime revenue. A business can be far past the XP requirement and still stay put because it hasn't earned enough money — check both numbers on the dashboard's progression panel.
A business has no level data at all
This can happen to businesses created before the progression tables existed. Run:
/vendingdebug progression status
/vendingdebug progression initstatus reports who's missing data; init fixes everyone at once. To fix a single business: /vendingdebug progression create <businessId>.
The daily bonus resets at a strange time
The daily bonus day rolls over at midnight UTC, not your local midnight. Depending on your timezone this can feel a few hours early or late — that's expected. To inspect what the server has saved, run /vendingdebug daily <businessId> and read the output in the server console.
Dashboard problems
/vdb opens nothing
- Only business owners and employees can open the dashboard — a player with no business gets nothing.
- Press F8 and look for red errors mentioning NUI or
oxide-vending. - Make sure the
html/folder is intact — if files were deleted or half-overwritten during an update, the screen can't load. - Check the server console for callback errors when the player runs the command.
The dashboard opens but data is missing or broken
- check the server console for errors at the moment the dashboard loads
- confirm the database connection is healthy (other oxmysql resources working?)
- if the map tab is blank, confirm the tile images still exist under
html/img/map-tiles/
Performance
Server-side
If the resource shows up in your server profiler:
- raise
Config.NPCSales.TickIntervalso the simulation runs less often - lower
Config.Transactions.RetentionDaysand keepPruneOnStartup = trueso the transactions table stays small - very dense clusters of machines make the competition checks work harder — encourage spreading out
Client FPS drops near machines
- many machine props packed into one spot is the usual cause
- the NPC visual feedback animates nearby pedestrians; turn
Config.NPCSales.VisualFeedback.Enabledoff if it bothers low-end players
Messages players might report
These are the exact texts players see, and what they mean:
| Message | Meaning |
|---|---|
| "This machine type is locked until Level X" | The business hasn't unlocked that machine type yet |
| "You have reached the maximum number of machines" | The business is at its machine limit for its level |
| "The server has reached the maximum number of vending businesses" | Your Config.Business.MaxBusinesses cap has been hit |
| "This item cannot be sold in this machine" | The item isn't on that machine type's whitelist in config/items.lua |
| "Price must be between $X and $Y" | The owner tried to set a price outside their level's allowed range |
| "Please wait before doing that again" / "Too many actions, please slow down" | The anti-spam limiter kicked in. Normal play shouldn't trigger it — if it does, the limits in server/main.lua can be relaxed |
| "Too many failed attempts. Try again in 5 minutes." | 5 wrong warehouse codes in a row — the lockout clears on its own |
Debug mode
Config.Debug = trueTurns on detailed logging for loading, placement, machine sync, leveling, NPC sales, and the warehouse and pickup systems. Use it while diagnosing, then turn it back off — it's noisy.