everything works fine in-game but it doesnt show me the players and in the console it gives me an error TriggerServerCallback => [esx_scoreboard:getConnectedPlayers] does not exists
and it also says this when i run the server
Error loading script server/main.lua in resource esx_scoreboard: @esx_scoreboard/server/main.lua:6: attempt to index a nil value (global ‘ESX’)
stack traceback: @esx_scoreboard/server/main.lua:6: in main chunk
Error running system event handling function for resource esx_scoreboard: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_scoreboard/server/main.lua:43: attempt to index a nil value (local ‘xPlayer’)
stack traceback: @esx_scoreboard/server/main.lua:43: in function ‘AddPlayerToScoreboard’ @esx_scoreboard/server/main.lua:17: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182
Do you have ESX installed properly? also, please attach the Citizen.CreateThread function from your esx_scoreboard / server / main.lua at line 43-the end of that thread.
Yes I tried to reinstall it but it gives me the same error for some odd reason… I will check it later for the ESX = nil when I get to my PC and I’ll edit this reply!
i added Citizen.CreateThread in line 43 and now getting error at line 44 : Error parsing script @ESX_Scoreboard/server/main.lua in resource ESX_Scoreboard : ~ESX_Scoreboard/server/main.lua:44: syntax error near connectedPlayers