diff --git a/init.lua b/init.lua index 6b795c80..9e6d07a1 100644 --- a/init.lua +++ b/init.lua @@ -4,7 +4,7 @@ ---LGPL-3.0-or-later if not _VERSION:find('5.4') then - error('^1Lua 5.4 must be enabled in the resource manifest!^0', 2) + error('Lua 5.4 must be enabled in the resource manifest!', 2) end local resourceName = GetCurrentResourceName() @@ -13,6 +13,10 @@ local ox_lib = 'ox_lib' -- Some people have decided to load this file as part of ox_lib's fxmanifest? if resourceName == ox_lib then return end +if lib and lib.name == ox_lib then + error(("Cannot load ox_lib more than once.\n\tRemove any duplicate entries from '@%s/fxmanifest.lua'"):format(resourceName)) +end + local export = exports[ox_lib] if GetResourceState(ox_lib) ~= 'started' then