kolton / d2bot-with-kolbot

d2bot game manager by D3STROY3R with kolbot libs by kolton for d2bs
346 stars 332 forks source link

Help :)- ReferenceError Custom Config not designed #2275

Open sine2 opened 4 years ago

sine2 commented 4 years ago

Having issues getting the bot to do anything once it logs into a game. I get an error saying not defined. I have looked at the config and it is a js file so not sure what I need to fix. New to this so any help or suggestions would be awesome ty Screenshot (4)

jmichelsen commented 4 years ago

It's complaining about the variable CustomConfig, that's defined in the file config/_CustomConfig.js. Here's the code that uses it, inside Config.js.

                if (!isIncluded("config/_customconfig.js")) {
                    include("config/_customconfig.js");
                }

                for (n in CustomConfig) { <------ This is line 22

So it imports the _CustomConfig.js and then accesses the variable on line 22. Are you using a custom config? Did the variable definition in _CustomConfig.js get deleted somehow? On master, it's defined as an empty object with comments on how to use it.

I'd check those places to start.