mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
Added condition to check if the job is activated to prevent the error "@esx_service/server/main.lua:52: attempt to index a nil value (field '?')" (#17)
* Fix for: SCRIPT ERROR: @esx_service/server/main.lua:52: attempt to index a nil value (field '?') Issue #9 * removed .vscode folder * fixed invalid condition statement on line 52 * Update server/main.lua Pushing the suggested change by @Dislaik. Co-authored-by: Matias Salas <42161973+Dislaik@users.noreply.github.com> Co-authored-by: Matias Salas <42161973+Dislaik@users.noreply.github.com>
This commit is contained in:
+4
-2
@@ -49,8 +49,10 @@ end)
|
||||
ESX.RegisterServerCallback('esx_service:isInService', function(source, cb, name)
|
||||
local isInService = false
|
||||
|
||||
if InService[name][source] then
|
||||
isInService = true
|
||||
if InService[name] ~= nil then
|
||||
if InService[name][source] then
|
||||
isInService = true
|
||||
end
|
||||
end
|
||||
|
||||
cb(isInService)
|
||||
|
||||
Reference in New Issue
Block a user