Changes between Initial Version and Version 1 of Ticket #3418


Ignore:
Timestamp:
Sep 15, 2015, 12:20:30 PM (9 years ago)
Author:
elexis
Comment:

The error occcurs in the second line:

   let army = this.getArmy(target.getMetadata(PlayerID, "PartOfArmy"));
   if (army.isCapturing(gameState))
   ...

m.DefenseManager.prototype.getArmy = function(partOfArmy)
{
	// Find the army corresponding to this ID partOfArmy
	for (let army of this.armies)
		if (army.ID === partOfArmy)
		    return army;

	return undefined;
};

That's probably easy to fix, only a missing check. But if you have a commands.txt file at hand where that error happens, that would help too.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3418

    • Property Keywords army undefined removed
    • Property Milestone Alpha 19Backlog
    • Property Summary TypeError: army is undefinedAI Defense Manager - army is undefined
  • Ticket #3418 – Description

    initial v1  
    11Hello,
    22
    3 Getting this error on some maps, this also cause a huge slowdown past some time (r17021).
     3Getting this error on some maps, this also causes a huge slowdown past some time (r17021).
    44
    55{{{