Troubleshooting
Frequent errors with tc-ui.
#No notification appears
- Check that
tc-uiis started: typeensure tc-uiin the server console and look for an error. - Open the in-game F8 console to see client-side errors.
- If you call it from your script through
tc.notify, checkshared_script '@tc-ui/init.lua'in your manifest. Otherwise use the export:exports['tc-ui']:notify(...).
#Error on the tc global (nil)
The global only exists when @tc-ui/init.lua is loaded. Add it:
fxmanifest.lua
dependency 'tc-ui'
shared_script '@tc-ui/init.lua'and make sure tc-ui starts before your resource.
#My NUI page does not have the TC style
Load the kit from your page (see NUI kit). The address starts with https://cfx-nui-tc-ui/…. A typo in the resource name (tc-ui) is enough to prevent loading.
#The mouse stays locked after closing
Always close the view with tc.ui.close(): NUI focus is managed by tc-ui, which gives it back only when no view asks for it any more. When tc-ui stops, focus is released automatically.
#tc.helpText does not stay on screen
That is expected: it is GTA's native help text and must be called every frame (in a loop). For a persistent prompt without a loop, use tc.showHud or tc.point.add.
#A mini-game does not respond
tc.minigamecannot be started twice at once: checktc.minigameActive().- Bomb modules (
wires,button…) are played with the mouse;precisionandsequencewith the keyboard.