Qbox-project / qbx_vehicleshop

GNU General Public License v3.0
10 stars 37 forks source link

New Update calling export problem #77

Closed Destructor closed 2 months ago

Destructor commented 4 months ago

Summary

The latest update prevents the purchase of a vehicle

Reproduction

Just purchase a vehicle to encounter the error (unable to purchase vehicle)

CRIPT ERROR: @qbx_vehicleshop/server/main.lua:248: [script:qbx_vehiclesh] An error occurred while calling exportCreatePlayerVehiclein resourceqbx_vehicles: [script:qbx_vehiclesh] citizen:/scripting/lua/scheduler.lua:739: SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:501: qbx_vehicles was unable to execute a query! [script:qbx_vehiclesh] Query: INSERT INTO player_vehicles (license, citizenid, vehicle, hash, mods, plate, state, garage) VALUES ((SELECT license FROM players WHERE citizenid = ?),?,?,?,?,?,?,?) [script:qbx_vehiclesh] [null,null,"vigero",-825837129,"{\"plate\":\"73SGP936\",\"fuelLevel\":100,\"bodyHealth\":1000,\"model\":-825837129,\"engineHealth\":1000}","73SGP936",0] [script:qbx_vehiclesh] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?)' at line 1 [script:qbx_vehiclesh] > logError (@oxmysql/dist/build.js:26284) [script:qbx_vehiclesh] > rawQuery (@oxmysql/dist/build.js:26476) [script:qbx_vehiclesh] > processTicksAndRejections (node:internal/process/task_queues:96) [script:qbx_vehiclesh] [script:qbx_vehiclesh] --- [script:qbx_vehiclesh] > handler (@qbx_vehicleshop/server/main.lua:248) [script:qbx_vehiclesh] > logError (@oxmysql/dist/build.js:26284) [script:qbx_vehiclesh] > rawQuery (@oxmysql/dist/build.js:26476) [script:qbx_vehiclesh] > processTicksAndRejections (node:internal/process/task_queues:96)

Expected behavior

Obtain a vehicle

Actual behavior

Server side error, which prevents the purchase of a vehicle

Additional context

No response

Current Version

Latest code

Custom Resources

No

Manason commented 2 months ago

This should be fixed now as vehicle shop now makes API calls to qbx_vehicles instead of inserting into the player_vehicles table directly.