ESX script errors


Can anyone help me get rid of these errors.

Do think you need this in the code in async


function MySQL.ready (callback)
    Citizen.CreateThread(function ()
        -- add some more error handling
        while GetResourceState('mysql-async') ~= 'started' do
            Citizen.Wait(0)
        end
        while not exports['mysql-async']:is_ready() do
            Citizen.Wait(0)
        end
        callback()
    end)
end 

@MON5T3R did you get it working ?