@esx_identity/server/main.lua:159: attempt to call a nil value (field 'RegisterCommand')

Hi

im getting this error when im starting my server.

Error loading script server/main.lua in resource esx_identity: @esx_identity/server/main.lua:159: attempt to call a nil value (field ‘Register_Command’)
stack traceback:
@esx_identity/server/main.lua:159: in main chunk

I you would like to take a look at the script i can post it here.

https://hastebin.com/iyoxaneniy.sql

3 Likes

Might sound like a simple question… but are you using the latest version of ESX. Looking at the code formating in the hastebin you posted looks like it should work fine, unless your es_extended does not have ESX.RegisterCommand as a function.

SpikE

1 Like

Hmm it looks like i dont have RegisterCommand as a function

Check here: https://hastebin.com/zunejoneho.rb

Oh es_extended where probably outdated i installed the newest and its working thanks man!

1 Like

updataing to the latest version of es_extended can cause other issues … since this last version went away from using essentialmode. Hopefully you do not run into any other issues.

SpikE

1 Like

You are right now im stuck in the air instead when im trying to make a character

like this :frowning:

1 Like

Updating to the lastest version of es_extended makes a switch to R* identifiers instead of steam id’s which is what kashacaters is prob looking for right now. Would be best to switch back to the old version of es_extended you had. and instead of upgrading to new es_extended. In the script you were trying to use change all instance of ESX.RegisterCommand to just RegisterCommand and see if that works.

SpikE

With that said… sooner or later all scripts will be converted to using the new version of ESX so upgrading at some point i would think would be required.

SpikE

1 Like

I will try that brb

Do you mean that i must remove all who starts with ESX?

Only remove ESX i mean

So … if you can go back to the es_extended version you were using before you upgraded… and then go back to esx_identity and inside of that script . where it tries to use ESX.RegisterCommand see if you can change it to just RegisterCommand as i think in the old version RegisterCommand was in essentialmode.

SpikE

1 Like

Ye i already downgraded, umm i think it may not work

Error loading script server/main.lua in resource esx_identity: Invalid Lua type: function
stack traceback:
[C]: in upvalue ‘_in’
citizen:/scripting/lua/natives_server.lua:471: in function ‘RegisterCommand’
@esx_identity/server/main.lua:159: in main chunk
Failed to load script server/main.lua.

doesn’t look like identity will work without the newest version of ESX. I have recently upgrade to the latest version of ESX and am going thru scripts to get them modified so they work. Took a few hrs to get Kashacters to work with latest version of ESX and it isn’t a easy modification but it can be done.

SpikE

Did you have problem with more than kashacters?

So far … since i was upgrading i have starting building the server up from the ground up… and only had minor problems … when looking for steam needs to be changed… but the major one was kashacters so far.

SpikE

Okey so what do you recommend i do to get kash and all that to work?

Sorry was helping someone else with a few scripts in discord. I am not sure the level of experience you have with coding… for me to get kash to work I needed to make edits to the core kash files as well as spawnmanager to allow it to work. I wouldn’t recommend making these kind of changes without knowing what you are doing since spawnmanager is a core file for fivem to work.

No problem!, No i think i will skip that since im not familiar with Lua

If I may ask, what version did you downgrade to?