Dadido3 / D3bot

A very primitive AI for GMod bots designed to work with Jetboom's Zombie Survival gamemode.
40 stars 28 forks source link

Mod kept making errors so I re-installed it and I keep getting errors again. #98

Open gmoduser38 opened 1 year ago

gmoduser38 commented 1 year ago

D3bot gives me these 2 errors, and they keep increasing.

[d3bot] lua/includes/util.lua:228: attempt to index local 'object' (a function value)

  1. IsValid - lua/includes/util.lua:228
    1. UpdateBotCmdFunction - addons/d3bot/lua/d3bot/sv_zs_bot_handler/handlers/undead_crow.lua:18
      1. fn - addons/d3bot/lua/d3bot/sv_zs_bot_handler/handle.lua:31
        1. unknown - lua/ulib/shared/hook.lua:109

[d3bot] lua/includes/util.lua:228: attempt to index local 'object' (a function value)

  1. IsValid - lua/includes/util.lua:228
    1. UpdateBotCmdFunction - addons/d3bot/lua/d3bot/sv_zs_bot_handler/handlers/undead_fallback.lua:30
      1. fn - addons/d3bot/lua/d3bot/sv_zs_bot_handler/handle.lua:31
        1. unknown - lua/ulib/shared/hook.lua:109

Zombie Survival Gamemode also gives me these 2 errors.

[Zombie Survival] gamemodes/zombiesurvival/gamemode/zombieclasses/zombie.lua:120: attempt to index local 'revive' (a function value)

  1. CalcMainActivity - gamemodes/zombiesurvival/gamemode/zombieclasses/zombie.lua:120
    1. unknown - gamemodes/zombiesurvival/gamemode/sh_animations.lua:55

[Zombie Survival] gamemodes/zombiesurvival/gamemode/zombieclasses/zombie.lua:159: attempt to index local 'revive' (a function value)

  1. P_CallZombieFunction - gamemodes/zombiesurvival/gamemode/zombieclasses/zombie.lua:159
    1. unknown - gamemodes/zombiesurvival/gamemode/sh_animations.lua:130

Did I do something wrong? I've tried on zs_villagehouse and other maps but the errors won't stop showing.

Dadido3 commented 1 year ago

Which version of ZS are you using? What other addons do you have installed? Does ZS work without D3bot, can you test with other players playing as zombies?

The error is related to the "revive" status of zombies. There are some rules that have to be met in order to kill a zombie (headshot, or legshot, or specific damage type, or damage > 70, ...), otherwise zombies will ragdoll for some seconds and then get revived with a small amount of HP.

For some reason the player's revive variable is set to a function, instead of the revive status entity. I have no idea how that happens, D3bot doesn't even set this variable. Either it's some other addon, or the gamemode is broken, or GMod's newest update causes problems.