So if i want to fix the second error, i just need to replace the script part in the photo with allof this:
names[source] = { name = GetPlayerName(source), id = source }
TriggerClientEvent('rlUpdateNames', GetHostId())
if GetHostId() then
TriggerClientEvent('rlUpdateNames', GetHostId())
end
end)
RegisterServerEvent('rlUpdateNamesResult')
And to fix the first error i need to do what?
Sorry for me asking so much. But I am fairly new to coding and server development and I have to learn some how
if data and tonumber(data.hunger) and tonumber(variation) then
local was_starving = data.hunger >= 100
data.hunger = data.hunger + variation
local is_starving = data.hunger >= 100