What goes wrong most often, what it actually means, and what to do about it. Most of these are configuration, not faults — and the message a player sees usually names the exact reason.
Installation and Access#
The resource stops on start with an error about custom.standalone
No framework was running when Lottery Creator started, so it had no bridge to load. Move ensure es_extended, ensure qb-core or ensure qbx_core above ensure qs-lottery-creator. There is no standalone mode.
Table 'qs_lottery_vendors' doesn't exist
The database was never imported. Import database/database.sql and restart — see Installation → The Database.
"You do not have permission to do this." on /lotterycreator
The creator opens for ESX admin and superadmin, for QBCore and Qbox admin or god or the command ace, and for the jobs in Config.CreatorJobs. For a job, grade must be false or a list — a single number such as grade = 3 is not read; write grade = { 3 } instead.
Machines are invisible, or "Model … is not valid" when placing
The prop is not being streamed. Make sure ensure lottery_machine is in your server.cfg, and check the spelling of any custom prop in Config.VendorProps. The shipped machine is lotrrery_vending_machine, with the double r.
Saving a machine fails with "Unknown column 'for_sale'"
The table is from an earlier version and player ownership is turned off, so the new columns were never added. Run the ALTER TABLE in Installation → Upgrading from an Earlier Version, or start once with Config.Ownership.enabled = true.
Every machine disappeared after an update
database.sql was imported again. It starts with DROP TABLE, so the machines, their owners and their earnings were deleted; only a database backup brings them back. Updates never need the file — the resource adds new columns by itself.
Machines and Tickets#
A machine has no option to buy a ticket
In order of likelihood:
It is for sale and has no owner — it shows only Buy machine. Untick For sale in the creator to make it a server machine.
It is owned and out of stock — its owner has to restock it.
Its Access Control limits it to jobs or grades the player does not have.
The target resource starts after Lottery Creator and was not detected — move its
ensurehigher.The player is further than
Config.VendorInteractDistance(2 metres) away.
Every machine stopped selling after an update
Machines from the old version were listed for sale when the new for_sale column was added, and a listed machine is not in service. Untick For sale on each one, or run:
UPDATE `qs_lottery_vendors` SET `for_sale` = 0 WHERE `owner` IS NULL;"You don't have enough money" with cash in hand
Each machine charges its own payment account, which may be bank or black money rather than cash. The account shows on the machine's card in the creator.
Using the scratchcard does nothing
The item is missing from your inventory's definitions, or exists under a different name from Config.VendorDefaults.item. Only that item opens a card: a machine whose Scratch Item is something else hands out an item that cannot be scratched. Definitions for each inventory are in Installation → Adding the Scratchcard Item.
The prize went to cash, not the bank
Correct behaviour. Prizes are always paid into the money account, whichever account paid for the ticket.
Players win more than they spend
With the shipped prize table a card pays about $45 on average against a $30 ticket, because each of the six squares pays on its own. Raise the NO WIN weight or lower the prizes — Usage → Balancing it has the formula.
Owned Machines#
"You can't afford this machine."
Machines and restocks are paid from Config.Ownership.account — the bank by default, not cash. The same message appears when a restock costs more than the account holds.
"You already own the maximum of 2 machines."
The limit is Config.Ownership.maxPerPlayer. Raise it, or set 0 for no limit.
"Price must be between 5 and 1000."
Owners set prices inside Config.Ownership.priceLimits. Widen the range there.
"The machine is already full."
It holds Config.Ownership.maxStock tickets (500 by default). A restock larger than the free room loads only what fits, and charges only for that.
The owner does not see "Manage machine"
The list of machines a player owns is sent when they join and after every purchase or sale, and it belongs to the character that bought them. After switching character without reconnecting, rejoin the server.
An evicted owner lost their earnings
Correct behaviour. Evict owner clears the uncollected earnings and the loaded stock without a refund, and so does deleting the machine in the creator. Ask the owner to collect first, or to sell the machine back themselves.
The Phone App#
The app says the lottery is not running
The phone looks for a started resource named exactly qs-lottery-creator. A renamed folder, or the resource stopped, gives this answer. If the app opens but never loads, check that Config.Phone.enabled is true — with it off, the lottery does not answer the phone at all.
Tickets cannot be bought from the phone
Config.Phone.allowRemotePurchase is off, so players have to visit a machine. Tickets bought there can still be scratched in the app.
The phone price is not the machine's price
Correct behaviour. The phone sells at Config.VendorDefaults.price, from Config.VendorDefaults.account, whatever any machine charges.
History, recent winners and the jackpot reset
They are kept in the server's memory, so they start again after a restart of the server or of the resource. Machines, owners, earnings and stock live in the database and are not affected.
Error Codes#
Server answers return a code rather than a sentence, so your scripts can react to them. The full list:
Code | Means |
|---|---|
| No machine has that id, or it was deleted. |
| The framework has no loaded player for that source — usually still joining. |
| The machine is up for sale and not in service. |
| The owned machine has no tickets loaded. |
| The ticket did not fit in the inventory. |
| The account the ticket is paid from is short. |
| The machine already has an owner, or is not listed. |
| The player already owns |
| The ownership account cannot pay for the machine or the restock. |
| Buying a machine could not be saved. The money was given back. |
| Only the owner can do that — or, for the ticket price, an admin. |
| There are no earnings waiting. |
| The machine is full, or the restock was for less than one ticket. |
| The new ticket price is outside |
|
|
| An admin control was used by somebody who is not a framework admin. |
| Buying from the phone is turned off. |
| On the phone: no scratchcard to use, or no open card to claim. |
| From the phone: no started resource named |
Still stuck? Open a ticket and include the server console from the moment Lottery Creator starts — with
Config.Debug = true— your framework and its version, and which inventory and target you run. A screenshot of the F8 console helps for anything about the interface.



