thebigsleepjoe / TTT-Bots-2

Player bots for Garry's Mod TTT
Creative Commons Attribution Share Alike 4.0 International
10 stars 2 forks source link

[BUG] New Roles Support Not Working #30

Closed Pawel99UK closed 7 months ago

Pawel99UK commented 7 months ago

Game version/server type

Stack trace/error

The error, if any. Example:

[TTT Bots 2.0] lua/tttbots2/components/sv_locomotor.lua:1579: attempt to index field 'DebugServer' (a nil value)
    1. unknown - lua/tttbots2/components/sv_locomotor.lua:1579
[TTT Bots 2.0] lua/tttbots2/roles/hitman.lua:6: table index is nil
    1. unknown - lua/tttbots2/roles/hitman.lua:6
        2. include - [C]:-1
            3. IncludeDirectory - lua/tttbots2/lib/sh_botlib.lua:554
                4. unknown - lua/tttbots2/lib/sv_roles.lua:141
                    5. include - [C]:-1
                        6. includeServer - lua/tttbots2/sh_tttbots2.lua:41
                            7. Reload - lua/tttbots2/sh_tttbots2.lua:92
                                8. unknown - lua/tttbots2/sh_tttbots2.lua:219
    [TTT Bots 2.0] lua/tttbots2/roles/jackal.lua:5: table index is nil
    1. unknown - lua/tttbots2/roles/jackal.lua:5
        2. include - [C]:-1
            3. IncludeDirectory - lua/tttbots2/lib/sh_botlib.lua:554
                4. unknown - lua/tttbots2/lib/sv_roles.lua:141
                    5. include - [C]:-1
                        6. includeServer - lua/tttbots2/sh_tttbots2.lua:41
                            7. Reload - lua/tttbots2/sh_tttbots2.lua:92
                                8. unknown - lua/tttbots2/sh_tttbots2.lua:219
    [TTT Bots 2.0] lua/tttbots2/roles/sidekick.lua:5: table index is nil
    1. unknown - lua/tttbots2/roles/sidekick.lua:5
        2. include - [C]:-1
            3. IncludeDirectory - lua/tttbots2/lib/sh_botlib.lua:554
                4. unknown - lua/tttbots2/lib/sv_roles.lua:141
                    5. include - [C]:-1
                        6. includeServer - lua/tttbots2/sh_tttbots2.lua:41
                            7. Reload - lua/tttbots2/sh_tttbots2.lua:92
                                8. unknown - lua/tttbots2/sh_tttbots2.lua:219

⚠️ If there is no error, please ensure you remove the triple backticks, or else your formatting will break.

Reproducing the bug

Steps to reproduce the behavior:

  1. Go to a p2p match
  2. expirence the game using steam version
  3. see bot code not working

Expected behavior

The sidekick should not teamkill you. Jackal/serial killer should 1v1 at the end with any last player which only sometimes happen.

E.g., "There should not be any errors thrown," or "The bots shouldn't die after sending a chat message."

Screenshots

Screenshots are always appreciated but not required (depending on the bug) image

Additional context

Providing extra context, including a mod collection or simple mod list, can hugely boost the speed at which your report gets addressed/resolved.

Pawel99UK commented 7 months ago

image 1 Jackal and 1 innocent only in game. (Teaming)

and a small suggestion when you sidekick a bot they should also fire at the people you are firing at and the bots who are firing at the jackal.

thebigsleepjoe commented 7 months ago

Resolved via commit: "Hotfix: Fix https://github.com/thebigsleepjoe/TTT-Bots-2/issues/30, stub out data to prevent nil index err"