Fix ticket amount coming back as nil

This commit is contained in:
Jim Shield
2022-08-25 17:10:25 +01:00
committed by GitHub
parent 47dfcca052
commit 235e3d187c

View File

@@ -144,7 +144,7 @@ RegisterNetEvent('jim-payments:Tickets:Menu', function(data)
--Get ticket info
local p = promise.new() QBCore.Functions.TriggerCallback('jim-payments:Ticket:Count', function(cb) p:resolve(cb) end)
local amount = Citizen.Await(p)
if not amount then triggerNotify(nil, "You don't have any tickets to trade", "error") amount = 0 return end
if not amount then triggerNotify(nil, "You don't have any tickets to trade", "error") amount = 0 return else amount = amount.amount end
local sellable = false
local name = "" local label = ""
--Check/adjust for job/gang names