HELP. @truck_logistics/server.lua:242: attempt to compare nil with number

I’ve seen quite abit of posts about this script when moving it from ghmattimysql to oxmysql.
Every time its this error. Someone must of figured it out? heeeeelp

[script:truck_logisti] SCRIPT ERROR: @truck_logistics/server.lua:242: attempt to compare nil with number
[script:truck_logisti] > ref (@truck_logistics/server.lua:242)
[script:truck_logisti] > <unknown> (@oxmysql/dist/build.js:22252)
[script:truck_logisti] > processTicksAndRejections (node:internal/process/task_queues:96)

This is the code it refers to. I’ve attached the server.lua
server.lua (35.8 KB)

Hello. On line 242, you are saying is num1 >= (greater or equal to) num2.
Then if either num1 or num2 is nil, meaning it was not found, or it doesn’t have a value in your DB, it will give you the error.
Check if ‘fragile’ is set to ‘NULL’ or that it has a value in your DB.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.