Dadido3 / D3bot

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

Fixed botmod convar throwing an error if set via console... #123

Closed ghost closed 8 months ago

ghost commented 8 months ago

...or if the caller is invalid (which should never happen)

Yes, I know other commands suffer from the error but I don't see anyone editing navmeshes from a developer console. BotMod is the only reasonable command to set from it.

Fixes this error:


[d3bot] addons/d3bot/lua/ulx/modules/sh/d3bot.lua:134: attempt to call method 'ChatPrint' (a nil value)
  1. call - addons/d3bot/lua/ulx/modules/sh/d3bot.lua:134
   2. __fn - addons/ulib/lua/ulib/shared/commands.lua:951
    3. execute - addons/ulib/lua/ulib/shared/commands.lua:1331
     4. unknown - addons/ulib/lua/ulib/shared/commands.lua:1358
      5. unknown - lua/includes/modules/concommand.lua:54```
Dadido3 commented 8 months ago

Looks alright, thanks for the commit.