Skip to Content
ScriptsLottoRecovery & maintenance

Recovery and maintenance

Lottery payouts and inventory delivery are controlled by the server. Most interrupted work is retried automatically, but an operation that may have completed its external money or inventory side effect is moved to manual review to prevent duplicate payment.

Inspect the reconciliation queue

Run the ACE-restricted command from the server console or as an authorized administrator:

lotto_reconciliation_queue

Each queued JSON entry includes the authoritative serial, operation, review status, attempt count, last error, current ticket or purchase state, payout or purchase total, and player identifier. An empty queue is reported explicitly.

Common operations include automatic instant payout, issuing a machine-redeemable claim item, machine redemption, draw-ticket purchase, draw-winner redemption, and void-refund redemption.

Resolve an interrupted operation

After checking framework money logs, inventory logs, and the player’s state, run exactly one resolution:

lotto_reconcile <serial> retry lotto_reconcile <serial> complete
ResolutionUse it whenResult
retryYou have confirmed the money or inventory side effect did not happen.Returns the operation to a retryable state so the resource can perform it.
completeYou have confirmed the side effect did happen.Marks the authoritative lottery operation complete without repeating the external side effect.

Choosing retry after a payout or item delivery already happened can duplicate a payout. Choosing complete when it did not happen can leave the player unpaid. If the evidence is inconclusive, leave the entry in review until it can be verified.

Only entries in manual-review state can be resolved. Invalid serials, invalid resolutions, and already-resolved entries are rejected and logged.

Safe database maintenance

  • Back up the database before manual work.
  • Do not edit ticket, draw, purchase, or reconciliation states directly unless directed by Red40 support.
  • Normal restarts preserve games, runs, machines, tickets, draws, purchases, media mappings, and audit records.

Audit retention

config/server.lua contains the audit controls:

SettingDefaultPurpose
audit.retainSettledtrueRetains settled records for review.
audit.retentionDays30Age used by scheduled audit cleanup.
audit.cleanupInterval21600Cleanup interval in seconds (six hours).
audit.logGeneratedTicketstrueKeeps generated ticket details for auditability.

Troubleshooting

/lotto_admin does nothing

Confirm the player has the ACE configured by adminAce, the command is being run in game, all dependencies started first, and the server reported the lotto resource ready. A missing or invalid web/build/backend-contract.json prevents readiness.

A game is missing from machines

  • Generic games are eligible immediately after a successful save.
  • Set games need a generated run; the definition itself is not sold.
  • Draw games must be enabled and not archived.
  • Check the item’s Visible toggle and save the machine catalog.

A thumbnail is missing

Open the panel as an authorized administrator to trigger generic thumbnail backfill. Check the server log for FiveManage errors, verify the token if configured, and confirm that uploads/thumbnails is writable and served by the resource. The local fallback should work without a Fivemanage token.

A machine cannot be saved

Stand within the configured placement distance, verify all coordinate and rotation fields are numeric, and restart the placement if its five-minute token expired. Only one coordinate-laser placement can be active on a client at a time.

An edit reports a conflict

Another administrator changed the record after your panel loaded. Close or reload the panel, review the latest values, and apply the change again.

Last updated on