lzinga/TTTWeightedTraitorSelection

Failing "GetTraintorCount' Function

Closed this issue · 6 comments

Greetings,

I want to use my TTT Server with the TTTWeightedTraitorSelection Add-On becaus I think the current traitor selection is not really random and we have the feeling that often the same players are always traitors while some are alyways innocents.

Sadly i get the following error message after the prerair round:

[TTT2] addons/tttweightsystem/lua/weightsystem/sv_init.lua:178: attempt to call global 'GetTraitorCount' (a nil value)

  1. SelectRoles - addons/tttweightsystem/lua/weightsystem/sv_init.lua:178
  2. unknown - gamemodes/terrortown/gamemode/server/sv_main.lua:1132

Timer Failed! [prep2begin][@gamemodes/terrortown/gamemode/server/sv_main.lua (line 923)]

It seems like its the same error as mentioned in the #18 Issue

Just for as much information as possible, are you also using PowerRounds? Also as note are you running this on a local listen server that you are making public or an actual hosted server?

no we dont use PowerRounds. We use the Haste mode, but I dont think this has something to do with it.
And I set up a dedicated Server, that I just run at my own PC.

Can it be, that the "GetTraitorCount" function get defined on the client?
Due to the problem I fixed yesterday I wasnt able to install that fix on my server and my client at the same time. I used the Steam Workshop because I just dont know how to install the mod on my client without it...

Maybe this error occurs, because only could install the add-on on my client via Workshop?
Then I could have the problem, that the fixed version via GitHub only runs on my server and the mod didnt run my client and the sh_playerweight.lua
and when I run it via the workshop I got the error from #24 and the mod didnt started at all?

What exactly do you mean by client? For anyone who joins the server they do not need to download this add-on, this is only really needed server side. The only time you need this on your personal computer is if your server is being hosted as a listen server.

As for using the workshop version instead of the github version, have you tried following the Installation Instructions? It is just a matter of copying the files to the addons directory and running the server once when using the default json configuration.

With client I ment my running gmod installation where I play.
Yesterday I didnt knew that you can send lua files with the AddCSLuaFile function when sombody is joining the server.

I now installed the latest version via GitHub on my server. Otherwise i would get the error #24 anyway.

And I want to use the json database so I didnt changed any config.
The thing is I cant autocomplete the first round to properly set up the server due to this error
Or can it be, that I get the error because the "local choice_count = #choices" is "nil" and to the function fails?

Can you try running ttt_minimum_players 1 when running the server, this should allow a round to start with only 1 person.

Yeah I set it, but I found the Issue...
I installed the TTT2 Mod and it seems, that something is this big updates does anything that this mod cant work...
I removed ttt2 from my server and this mod here workes fine.

I will close this issue and open a new one in the TTT2 Github Projekt over here:
https://github.com/TTT-2/TTT2

Still thanks for the time and the quick response!