TTT-2 / TTT2

Trouble in Terrorist Town 2 for Garry's Mod (gmod)
https://steamcommunity.com/sharedfiles/filedetails/?id=1357204556
178 stars 74 forks source link

attempt to perform arithmetic on field 'TipIndex' (a nil value) #331

Closed Krzyska-Filip closed 5 years ago

Krzyska-Filip commented 5 years ago

Describe the bug Some players (every 5/6th player) receive an error as soon as they join the server. They can't see hud and they can't use f1(settings), scoreboard. In addition, they see a white window on the right.

To Reproduce Steps to reproduce the behaviour:

  1. Connect to the server.
  2. Just it.

Expected behaviour

  1. HUD should work - it doesn't
  2. F1 should open settings - it opens empty
  3. Tab should open scoreboard - it doesn't

Screenshots Below. (cl_error)

Desktop (please complete the following information):

files: workshop.txt clientside_errors.txt cl_error

TimGoll commented 5 years ago

This is strange since the bug seems to be caused by the vanilla TTT tips in the bottom area. Do you know if these player might have disabled the tips?

TimGoll commented 5 years ago

Additionally to your line --resource.AddWorkshop(1117144118) --ttt2 team buy ---------------doesn't work: TTT/2 teambuy does work. This might be a problem on your side

Alf21 commented 5 years ago

The tips are irrelevant. You have a incompatible addon. Maybe the wrong tttdamagelogs or the wrong specdm?

TimGoll commented 5 years ago

damagaelogs was my first thought as well because of the problem with the fifth player. But the error does look different than the typical damagelogs error

TimGoll commented 5 years ago

A tip for the future: please use a service like gist.github.com oder pastebin.com instead of textfiles

Krzyska-Filip commented 5 years ago

I. Two people said they had turned on. II. I turned off because one addon was shown as unknown without an icon III. I have removed all addons and cache except ttt2 according to your suspicions and now it works. Thank you for your time.

Edit: it was caused by damagelogs.

Alf21 commented 5 years ago

Use my damagelogs instead. There is a hint in the ws and GitHub too :D

Krzyska-Filip commented 5 years ago

I have installed your logs but they still didn't work. So I tried this solution (https://github.com/Alf21/TTT2/pull/332/files) and now it works fine.

Alf21 commented 5 years ago

To fix it finally, there need to be a reallocation of the PANEL (self var) and the cached tables ("cached_default ", "cached_active"). But as I said, this will just fix the error spam, not the primary error. @Dzwiedziasty