RegisterNUICallback "attempt to call a nil value (local 'cb')"

According to the docs:

To prevent requests from stalling, you have to return the callback at all times - even if containing just an empty object, or {“ok”:true}, or similar.

However, when this NUI callback is invoked:

RegisterNUICallback(
    "hide",
    function(_, cb)
        SetNuiFocus(false, false)
        cb()
    end
)

I do not wish my callback to return anything, hence me just calling it with no parameters, but the error is suggesting that cb is not defined. Anyone ever seen this before?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.