Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.lua #22

Merged
merged 1 commit into from
Oct 6, 2024
Merged

Update main.lua #22

merged 1 commit into from
Oct 6, 2024

Conversation

zozomanx
Copy link
Contributor

@zozomanx zozomanx commented Oct 6, 2024

Description

Previous qbx.spawnVehicle was causing an error when attempting to take out a car or helicopter.

Old code:

local netId, veh = qbx.spawnVehicle(source, model, coords)

Error:

[  script:qbx_newsjob] SCRIPT ERROR: @qbx_core/modules/lib.lua:249: attempt to index a number value (local 'params') 
[  script:qbx_newsjob] > callbackResponse (@ox_lib/imports/callback/server.lua:79) 
[  script:qbx_newsjob] > handler (@ox_lib/imports/callback/server.lua:96)

The new code doesn't generate this error and spawns the vehicle as expected.

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

Previous qbx.spawnVehicle was causing an error:

"[  script:qbx_newsjob] SCRIPT ERROR: @qbx_core/modules/lib.lua:249: attempt to index a number value (local 'params')
[  script:qbx_newsjob] > callbackResponse (@ox_lib/imports/callback/server.lua:79)
[  script:qbx_newsjob] > handler (@ox_lib/imports/callback/server.lua:96)"
@solareon solareon merged commit 01e50f3 into Qbox-project:main Oct 6, 2024
2 checks passed
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.

2 participants