Hi there. I’m getting different script errors from different plugins sometimes when I join my dev server. The problem is it sometimes works just fine, and the errors differ all the time.
Unlike my previous problem [Help] Same client script works when hosted on localhost, but breaks on linux which has been resolved, server doesn’t crash during cache creation, nothing else indicates there’s something wrong.
Most of the errors make no sense:
Creating script environments for QC_vrp_charcreator
Error loading script menus.lua in resource QC_vrp_charcreator: @vrp/lib/utils.lua:46: error parsing module vrp/lib/Proxy:[string "vrp/lib/Proxy.lua"]:20: syntax error near '}'
So it says there’s syntax error in vrp proxy library, which I’m using without any modifications, as published at https://github.com/ImagicTheCat/vRP/tree/1.0 and used without any problems by hundreds of other people.
Here are some of the other errors I’m getting:
SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:199: bad argument #1 to 'unpack' (table expected, got nil)
> [global chunk]^7 (^5@vrp/lib/utils.lua^7:67)
> fn^7 (^5@vrp/client/quadcore.lua^7:79)
SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:199: bad argument #1 to 'unpack' (table expected, got nil)
> [global chunk]^7 (^5@vrp/lib/utils.lua^7:67)
> fn^7 (^5@vrp/client/quadcore.lua^7:79)
Just to clarify things, the exact same function on vrp/client/quadcore.lua:79 works fine randomly after several re-joins, and sometimes breaks without any changes to code (tested on multiple Debian 9 and Windows hosts, multiple PCs, different server builds 29XX).
[ 48172] [ GTAProcess] 11932/ QC: Starting charcreator
[ 53953] [ GTAProcess] 11932/ ^1SCRIPT ERROR: [string "vrp/lib/Proxy.lua"]:33: attempt to call a nil value (global 'async')^7
[ 53953] [ GTAProcess] 11932/ ^3> BuildMenu^7 (^5@QC_vrp_charcreator/menus.lua^7:344)
[ 53953] [ GTAProcess] 11932/ ^3> createCamera^7 (^5@QC_vrp_charcreator/client.lua^7:525)
[ 53953] [ GTAProcess] 11932/ ^3> createInitial^7 (^5@QC_vrp_charcreator/client.lua^7:504)
[ 53953] [ GTAProcess] 11932/ ^3> f^7 (^5@QC_vrp_charcreator/client.lua^7:131)
[ 53953] [ GTAProcess] 11932/ ^3> handler^7 (^5rp/lib/Tunnel.lua^7:143)
[ 36312] [ GTAProcess] 6516/ Uncaught SyntaxError: missing ) after argument list (@vrp/gui/lib/libopus.wasm.js:1)
[ 31406] [ GTAProcess] 14532/ Uncaught ReferenceError: libopus is not defined (@vrp/gui/AudioEngine.js:31)
[ 32937] [ GTAProcess] 10732/ Error loading script @vrp/lib/utils.lua in resource QC_vrp_charcreator: @vrp/lib/utils.lua:43: error loading module vrp/lib/Debug:@vrp/lib/utils.lua:46: error parsing module vrp/lib/Tools:[string "vrp/lib/Tools.lua"]:32: 'end' expected (to close 'if' at line 26) near 'e'
[ 32937] [ GTAProcess] 10732/ stack traceback:
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:46: in function 'module'
[ 32937] [ GTAProcess] 10732/ [string "vrp/lib/Debug.lua"]:2: in main chunk
[ 32937] [ GTAProcess] 10732/ [C]: in function 'xpcall'
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:38: in function 'module'
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:56: in main chunk
[ 32937] [ GTAProcess] 10732/ stack traceback:
[ 32937] [ GTAProcess] 10732/ [C]: in function 'error'
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:46: in function 'module'
[ 32937] [ GTAProcess] 10732/ [string "vrp/lib/Debug.lua"]:2: in main chunk
[ 32937] [ GTAProcess] 10732/ [C]: in function 'xpcall'
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:38: in function 'module'
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:56: in main chunk
[ 32937] [ GTAProcess] 10732/ stack traceback:
[ 32937] [ GTAProcess] 10732/ [C]: in function 'error'
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:43: in function 'module'
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:56: in main chunk
[ 32937] [ GTAProcess] 10732/ Failed to load script @vrp/lib/utils.lua.
[ 32937] [ GTAProcess] 10732/ Error loading script client.lua in resource QC_vrp_charcreator: @vrp/lib/utils.lua:46: error parsing module vrp/lib/Tunnel:[string "vrp/lib/Tunnel.lua"]:21: syntax error near '<\135>'
[ 32937] [ GTAProcess] 10732/ stack traceback:
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:46: in function 'module'
[ 32937] [ GTAProcess] 10732/ @QC_vrp_charcreator/client.lua:2: in main chunk
[ 32937] [ GTAProcess] 10732/ stack traceback:
[ 32937] [ GTAProcess] 10732/ [C]: in function 'error'
[ 32937] [ GTAProcess] 10732/ @vrp/lib/utils.lua:46: in function 'module'
[ 32937] [ GTAProcess] 10732/ @QC_vrp_charcreator/client.lua:2: in main chunk
[ 32937] [ GTAProcess] 10732/ Failed to load script client.lua.
[ 28922] [ GTAProcess] 12148/ Error loading script menus.lua in resource QC_vrp_charcreator: @vrp/lib/utils.lua:46: error parsing module vrp/lib/Proxy:[string "vrp/lib/Proxy.lua"]:20: syntax error near '<\18>'
[ 28922] [ GTAProcess] 12148/ stack traceback:
[ 28922] [ GTAProcess] 12148/ @vrp/lib/utils.lua:46: in function 'module'
[ 28922] [ GTAProcess] 12148/ @QC_vrp_charcreator/menus.lua:1: in main chunk
[ 28922] [ GTAProcess] 12148/ stack traceback:
[ 28922] [ GTAProcess] 12148/ [C]: in function 'error'
[ 28922] [ GTAProcess] 12148/ @vrp/lib/utils.lua:46: in function 'module'
[ 28922] [ GTAProcess] 12148/ @QC_vrp_charcreator/menus.lua:1: in main chunk
[ 28922] [ GTAProcess] 12148/ Failed to load script menus.lua.