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

Script Error - Execution of Native 00000000e8522d58 in script host Tried to access invalid entity: 152105 #131

Open
MrRasmus opened this issue May 10, 2022 · 3 comments

Comments

@MrRasmus
Copy link
Contributor

 SCRIPT ERROR: Execution of native 00000000e8522d58 in script host failed: Tried to access invalid entity: 152105
[ script:MojiaGarages] > GetVehicleNumberPlateText (GetVehicleNumberPlateText.lua:2)
[ script:MojiaGarages] > GetPlate (@MojiaGarages/server.lua:78)
[ script:MojiaGarages] > TryGetLoadedVehicle (@MojiaGarages/server.lua:83)
[ script:MojiaGarages] > RefreshVehicles (@MojiaGarages/server.lua:679)
[ script:MojiaGarages] > handler (@MojiaGarages/server.lua:698)
[ script:MojiaGarages] > Query.onResult (@oxmysql/dist/build.js:21715)
[ script:MojiaGarages] > <unknown> (@oxmysql/dist/build.js:11918)
[ script:MojiaGarages] > processTicksAndRejections (node:internal/process/task_queues:78)
@wittyphantom333
Copy link

wittyphantom333 commented Jul 7, 2022

@MrRasmus this has been driving me bonkers for days and finally an error tripped client side that solved it.

if tonumber(modifications.bodyHealth) <= 0 then modifications.bodyHealth = 0 elseif tonumber(modifications.bodyHealth) >= 1001 then modifications.bodyHealth = 1000 end if tonumber(modifications.engineHealth) <= 0 then modifications.engineHealth = 0 elseif tonumber(modifications.engineHealth) >= 1001 then modifications.engineHealth = 1000 end

This example is a fix I put in for another issue, but this needs to be changed tonumber() before the compare as its grabbed as a string. Not sure if this is the best solution, but it worked perfect.

If this works for you also I'll do a PR

@wittyphantom333
Copy link

@MrRasmus this has been driving me bonkers for days and finally an error tripped client side that solved it.

if tonumber(modifications.bodyHealth) <= 0 then modifications.bodyHealth = 0 elseif tonumber(modifications.bodyHealth) >= 1001 then modifications.bodyHealth = 1000 end if tonumber(modifications.engineHealth) <= 0 then modifications.engineHealth = 0 elseif tonumber(modifications.engineHealth) >= 1001 then modifications.engineHealth = 1000 end

This example is a fix I put in for another issue, but this needs to be changed tonumber() before the compare as its grabbed as a string. Not sure if this is the best solution, but it worked perfect.

If this works for you also I'll do a PR

Okay, this sort of fixed it, until population went above 30 and it came back

@wittyphantom333
Copy link

Turns out, this mainly ended up being a database issue. For me, the table for the both the players and the cars where missing the fivem license identifier

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

No branches or pull requests

2 participants