Closed luthanirgi closed 4 months ago
do you have a code example of a progressbar which causes this?
do you have a code example of a progressbar which causes this?
here it is, but the error appear before using this, not pretty sure what is trigger that error
RegisterNetEvent('consumables:client:UseHeavyArmor', function()
if GetPedArmour(PlayerPedId()) >= 91 then
QBCore.Functions.Notify(Lang:t('consumables.armor_full'), 'error')
return
end
local ped = PlayerPedId()
local PlayerData = QBCore.Functions.GetPlayerData()
if lib.progressCircle({
duration = 5000,
label = Lang:t('consumables.heavy_armor_progress'),
useWhileDead = false,
canCancel = true,
disable = {
move = false,
car = true,
combat = true,
},
anim = {
dict = 'oddjobs@basejump@ig_15',
clip = 'puton_parachute',
}
}) then
TriggerServerEvent('consumables:server:useHeavyArmor')
end
end)
if lib.progressBar({
duration = 2000,
label = { label = 'Drinking water' },
useWhileDead = false,
canCancel = true,
disable = {
car = true,
},
anim = {
dict = 'mp_player_intdrink',
clip = 'loop_bottle'
},
prop = {
model = `prop_ld_flow_bottle`,
pos = vec3(0.03, 0.03, 0.02),
rot = vec3(0.0, 0.0, -1.5)
},
}) then
print('Do stuff when complete')
else
print('Do stuff when cancelled')
end
i can reliably reproduce the #31
error with this code. so i would check that Lang:t('consumables.heavy_armor_progress')
produces the results you are expecting
Minified React error #31
relates to trying to render an object in a react component. and the only value being rendered from the data passed is label
. so your issue lies somewhere in your label from my guess
Minified React error #31
relates to trying to render an object in a react component. and the only value being rendered from the data passed islabel
. so your issue lies somewhere in your label from my guess
i see, thanks!
Describe the bug Progressbar will not open, animation will loop
To Reproduce Not pretty sure but it happens randomly
Additional context [ 4918250] [b2944_GTAProce] CrBrowserMain/ Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Btext%2C%20caption%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings. (@ox_lib/web/build/assets/index-cfb4TwGx.js:40) [ 4918250] [b2944_GTAProce] CrBrowserMain/ Uncaught Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Btext%2C%20caption%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings. (@ox_lib/web/build/assets/index-cfb4TwGx.js:40)
Version Latest Version