Skip to content

Commit

Permalink
fix: global variable in lowercase initial
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Oct 2, 2024
1 parent a66e1e1 commit 9da0500
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions server-data/resources/[esx]/es_extended/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ if Config.Multichar then
if not ESX.Players[src] then
local identifier = char .. ":" .. ESX.GetIdentifier(src)
if data then
createESXPlayer(identifier, src, data)
CreateESXPlayer(identifier, src, data)
else
loadESXPlayer(identifier, src, false)
LoadESXPlayer(identifier, src, false)
end
end
end)
Expand All @@ -43,12 +43,12 @@ else
end

if not ESX.Players[_source] then
onPlayerJoined(_source)
OnPlayerJoined(_source)
end
end)
end

function onPlayerJoined(playerId)
function OnPlayerJoined(playerId)
local identifier = ESX.GetIdentifier(playerId)
if identifier then
if ESX.GetPlayerFromIdentifier(identifier) then
Expand All @@ -61,17 +61,17 @@ function onPlayerJoined(playerId)
else
local result = MySQL.scalar.await("SELECT 1 FROM users WHERE identifier = ?", { identifier })
if result then
loadESXPlayer(identifier, playerId, false)
LoadESXPlayer(identifier, playerId, false)
else
createESXPlayer(identifier, playerId)
CreateESXPlayer(identifier, playerId)
end
end
else
DropPlayer(playerId, "there was an error loading your character!\nError code: identifier-missing-ingame\n\nThe cause of this error is not known, your identifier could not be found. Please come back later or report this problem to the server administration team.")
end
end

function createESXPlayer(identifier, playerId, data)
function CreateESXPlayer(identifier, playerId, data)
local accounts = {}

for account, money in pairs(Config.StartingAccountMoney) do
Expand All @@ -91,7 +91,7 @@ function createESXPlayer(identifier, playerId, data)
end

MySQL.prepare(newPlayer, parameters, function()
loadESXPlayer(identifier, playerId, true)
LoadESXPlayer(identifier, playerId, true)
end)
end

Expand Down Expand Up @@ -123,7 +123,7 @@ if not Config.Multichar then
end)
end

function loadESXPlayer(identifier, playerId, isNew)
function LoadESXPlayer(identifier, playerId, isNew)
local userData = {
accounts = {},
inventory = {},
Expand Down

0 comments on commit 9da0500

Please sign in to comment.