Nostrademous / Dota2-WebAI

MIT License
33 stars 6 forks source link

dota_bot_reload_scripts doesnt work #14

Closed ThePianoDentist closed 7 years ago

ThePianoDentist commented 7 years ago
attempt to perform arithmetic on field 'lastModeThink' (a nil value)

when try and reload bots. have to reload whole game. Whilst its not too much of a nuisance, it would nice if we could get reloading-bots to not break in the long term. even if only for debugging stuff

ThePianoDentist commented 7 years ago

location of error

beta/game/dota/scripts/vscripts/bots/decision.lua:148

if GameTime() - self.lastModeThink >= 0.1

can be fixed by 1 line change

    if GetGameState() == GAME_STATE_PRE_GAME and not self.Init then

to

if not self.Init then

im not sure if the GAME_STATE_PRE_GAME check is necessary, therefore im leaving any possible fix to you

Nostrademous commented 7 years ago

Noted, will fix later tonight, thanks. Or you can fix and submit a pull request and I will approve within 15 min.

Nostrademous commented 7 years ago

Fixed in 8c6fae9