SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed: Argument at index 1 was null

So… I have some problem with my Miner Job Script.
[ c-scripting-core] InvokeNative: execution failed: Argument at index 1 was null.
[ script:esx_minerjob] SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed: Argument at index 1 was null.

Argument at index 1 was null.

The eventTarget (playerId/source) was nil for TriggerClientEvent. The usual cause is that source was lost due to yielding the event, i.e.

RegisterNetEvent('myevent', function()
    local src = source
    print(source) -- playerId
    Wait(0)
    print(source) -- nil
    print(src) -- playerId
end)
1 Like