From 3d0412c1470625ee2708f68ea8bc93e094284cbb Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sun, 3 Sep 2023 12:10:01 +1000 Subject: [PATCH] refactor(server): check if people deleted their sql file like chumps because it gets real annoying having people complain about errors they caused. --- server/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 273c0646..64162f70 100644 --- a/server/main.lua +++ b/server/main.lua @@ -233,7 +233,9 @@ local function isAuthorised(playerId, door, lockpick) return authorised end -MySQL.query(LoadResourceFile(cache.resource, 'sql/ox_doorlock.sql')) +local sql = LoadResourceFile(cache.resource, 'sql/ox_doorlock.sql') + +if sql then MySQL.query(sql) end MySQL.ready(function() while Config.DoorList do Wait(100) end