GZer / MyKolbot

This is a custom fork repository, it runs 8 characters to 90+.
9 stars 1 forks source link

Error in levelfollower.js #13

Closed Haretakis closed 4 years ago

Haretakis commented 4 years ago

Hey all, I am getting the following errors. In consule: 17:46:27 (ColdSorc) Error in LevelFollower (levelfollower.js #252) WhereIsLeader is undefined (Area: 1, Ping:94, Game: Au-87)

In game: 1Error in LevelFollower 1(levelfollower.js line 1252): 1WhereIsLeader is undefined

I tried putting my lead's config.name in for Config.Leader to no avail. Gave another error saying Barbarian1 undefined.

Let me know if shots of the errors would help. I've attach what I believe is the relevant code.

`};

Town.doChores();
Town.move("portalspot");
Pather.getWP(me.area);
Town.move("portalspot");
WhereIsLeader = getParty(Config.Leader);
var partyTimeout = 0;
while(!this.getLeaderUnit(Config.Leader)){                                              //Loop to ensure leader is assigned
    delay(1000);
    partyTimeout++;
    this.goFindLeader(WhereIsLeader.area);
    if(partyTimeout>5){quit();}
}
LeaderUnit = this.getLeaderUnit(Config.Leader);

while(LeaderUnit){
    if(copyUnit(LeaderUnit).x){
        if(getDistance(me,LeaderUnit)>5){
            Pather.teleport = false;
            Pather.moveToUnit(LeaderUnit,rand(-4,4),rand(-4,4),true,true);
            Attack.clear(20);
            delay(500);
        }
    }else{
        this.goFindLeader(WhereIsLeader.area);
    }
    delay(1000);
}
return true;

}`

GZer commented 4 years ago

You need to set the Leader in the Follower auto level...

Example image