ESX_Doorlock error

I installed esx_doorlock, everytime I start my server it says "@esx_doorlock/server/main.lua:16: in main chunk
failed to load script server/main.lua
and the resource is not working.

Well you failed to provide any of the actually useful error bits. You gave us the line but not what the issue is. Googling esx doorlock and coming to this: GitHub - esx-community/esx_doorlock: ESX door lock!
Line 16 would indicate that your file is failing to perform the ESX.RegisterServerCallback function
image
Again though, you provided only the line of the error, not any information describing what the error is so there isn’t much anyone can do but speculate what is wrong on that line, i.e. Your ESX object contains no RegisterServerCallback function

In my console I get this message:

[ c-scripting-core] Creating script environments for esx_doorlock
[ script:es_extended] [ERROR] Resource esx_doorlock Used the getSharedObject Event, this event no longer exists! Visit esx:getSharedObject Deprecation | ESX Documentation for how to fix!
[ script:esx_doorlock] Error loading script server/main.lua in resource esx_doorlock: @esx_doorlock/server/main.lua:16: attempt to index a nil value (global ‘ESX’)
[ script:esx_doorlock] stack traceback:
[ script:esx_doorlock] @esx_doorlock/server/main.lua:16: in main chunk
[ c-scripting-core] Failed to load script server/main.lua.

I visited the link but it is kind of confusing to me on what exactly I should do

What you need to do is go into your es_extended/common/functions.lua, and at the very top you need to add
AddEventHandler(‘esx:getSharedObject’, function(cb) cb(ESX) end)

Sorry just came back from work,

I added it here but I am still seeing the error on my console when I start the server

Are you getting an error or a message? Errors are red and break the resource, messages just tell you stuff.

image
Do you see this “error” only, or are you saying you see this actual error here still too?
image

an actual error message, all caps and in red