Skip to content

Commit

Permalink
refactor(server): check if people deleted their sql file like chumps
Browse files Browse the repository at this point in the history
because it gets real annoying having people complain about errors they caused.
  • Loading branch information
thelindat committed Sep 3, 2023
1 parent 340727f commit 3d0412c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d0412c

Please sign in to comment.