Skip to content

Commit

Permalink
Prevent indexing a nil value
Browse files Browse the repository at this point in the history
This should solve issue when SqlKeybinding is set to true, but oxmysql is still commented in fxmanifest
  • Loading branch information
iSentrie committed Oct 8, 2024
1 parent 6b8dd48 commit 4c534c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/Server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ local function addKeybindEventHandlers()
end

if Config.SqlKeybinding then -- and MySQL then
if GetResourceMetadata(GetCurrentResourceName(), 'server_script', 0) ~= '@oxmysql/lib/MySQL.lua' then
return print("^3Error! You're using Config.SqlKeybinding without oxmysql, you need to uncomment it in fxmanifest.lua^0")
end

MySQL.update(
[[
CREATE TABLE IF NOT EXISTS `dpkeybinds` (
Expand Down

0 comments on commit 4c534c7

Please sign in to comment.