- Katılım
- 4 yıl 5 ay 15 gün
- Mesajlar
- 368
Sunucuda para verirken es_extended/server/main.lua:319: attempt to index a nil value hatası veriyor konsoldan o satıra denk gelen kod ise
sorunu çözebilecek var mı?
Kod:
if itemCount > 0 and sourceXPlayer.getAccount(itemName).money >= itemCount then
sourceXPlayer.removeAccountMoney(itemName, itemCount)
targetXPlayer.addAccountMoney (itemName, itemCount)
TriggerClientEvent('esx:showNotification', _source, _U('gave_account_money', ESX.Math.GroupDigits(itemCount), Config.AccountLabels[itemName], targetXPlayer.name))
TriggerClientEvent('esx:showNotification', target, _U('received_account_money', ESX.Math.GroupDigits(itemCount), Config.AccountLabels[itemName], sourceXPlayer.name))
else
TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
end