[ERROR] ERROR: SCRIPT ERROR @esx_policejob/client/main.lua:1493 attemp to index a nil value (global 'esx')

Hello.

I was doing the police and they would not let me make objections or see the identity document and looking for the error I found this

I leave you a video for you to understand, in the video the error does not appear because I did not notify it

ERROR: SCRIPT ERROR @esx_policejob/client/main.lua:1493 attemp to index a nil value (global ‘esx’)

Video
Translate:
Buscar: Seach
Identidad: Identity

Please help me

Thanks for reading

1 Like

Your client script is unable to get the info it needs from ESX returning nil because ESX doesn’t exist at that time.

Either your other part of code is executing faster than ESX is loading on client startup or then you have larger problem involving ESX but anyway it should be easy to fix.

please paste your police client main lua script here

This is my client
esx_policejob.rar (67.0 KB)

on row 1491 of policejob client main.lua paste this code:

while ESX == nil do Wait(0) end

Should look like this

Ok thanks, I’m going to test to see if it works, they also tell me that you can see an installation failure in esx_identity

It still does not work, I have put that code and nothing

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