Skip to content

fix: shop error pane and vehicle storage defaults - #649

Merged
Qwerty1Verified merged 3 commits into
mainfrom
fix/shop-error-pane-and-vehicle-defaults
Sep 9, 2026
Merged

Qwerty1Verified merged 3 commits into
mainfrom
fix/shop-error-pane-and-vehicle-defaults

Conversation

@Qwerty1Verified

Copy link
Copy Markdown
Member

Summary

Two unrelated one-line fixes.

Shop purchase errors highlighted the wrong pane. Three failure paths in
handlePurchase (html/app.js) called inventoryError(sourceSlot) without the
second argument, so they fell back to the inventory = "player" default in the
signature. All three now pass "other".

Uncovered vehicle classes got stash-sized storage. server/commands.lua fell
back to VehicleStorage.default.slots and VehicleStorage.default.maxWeight, but
the default block defines trunkSlots, trunkWeight, gloveboxSlots and
gloveboxWeight. Both fallbacks resolved to nil, so OpenInventory received
{ slots = nil, maxweight = nil } and landed on Config.StashSize. Classes 10
(Industrial) and 11 (Utility) are the two absent from config/vehicles.lua, so tow
trucks, tractors, trailers, mixers, tippers and flatbeds were getting 2,000kg / 100
slot trunks and gloveboxes instead of the intended 60kg / 35 and 10kg / 5. The
default block had never been reachable

Related issue

No issue.

Change type

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor, maintenance, or performance improvement

Testing

  • FXServer artifact: b35265
  • qb-core version or commit: 1.3.0
  • Resource version or commit: 2.2.2 / 989b27a
  • Server operating system: Windows Server 2022
  • Test steps and results:
  1. Attempted a shop purchase of 100 items with insufficient cash; the error flashed
    on the shop item in the shop pane.
  2. Attempted a purchase with the inventory at its weight cap; same, correct pane.
  3. Spawned a tow truck (Utility, class 11) and opened its glovebox;
    read 10kg, previously 2,000kg. Opened the trunk; read 60kg, previously 2,000kg.
  4. Covered classes are structurally unaffected.

Compatibility and migration

Behaviour note: Industrial and Utility class vehicles now have correctly sized trunks
and gloveboxes. On servers where players have been using those vehicles, existing
contents may exceed the corrected limit, in which case items are retained but nothing
further can be added until it is back under the cap.

Checklist

  • I agree to follow the QBCore FiveM Code of Conduct.
  • My pull request title follows Conventional Commits, such as fix(scope): ... or feat(scope): ....
  • This pull request contains one focused change and does not include unrelated formatting or refactoring.
  • I tested the change on a current FXServer artifact with the relevant official resources and dependencies.
  • Existing repository checks and linting pass.
  • I documented new behavior and identified every breaking or migration-related change.
  • I added or updated configuration examples, SQL migrations, and translations where applicable.
  • I removed credentials, webhook URLs, license keys, database data, player identifiers, and other private information.
  • I have the right to submit all included code and assets under the repository's license.
  • I understand and reviewed all submitted code, including any AI-assisted code, and accept responsibility for its correctness and licensing.

@Qwerty1Verified
Qwerty1Verified merged commit c741c4f into main Sep 9, 2026
2 checks passed
@Qwerty1Verified
Qwerty1Verified deleted the fix/shop-error-pane-and-vehicle-defaults branch September 9, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant