Opened 7 years ago

Closed 7 years ago

#4627 closed defect (fixed)

ReferenceError: assignment to undeclared variable attackData

Reported by: Mohamed Moanis Owned by: mimo
Priority: Release Blocker Milestone: Alpha 22
Component: UI & Simulation Keywords:
Cc: Patch:

Description

Getting a bunch of this error on latest build.

ERROR: JavaScript error: simulation/ai/petra/attackManager.js line 521
ReferenceError: assignment to undeclared variable attackData
  m.AttackManager.prototype.switchDefenseToAttack@simulation/ai/petra/attackManager.js:521:55
  m.DefenseManager.prototype.switchToAttack@simulation/ai/petra/defenseManager.js:754:1
  m.DefenseManager.prototype.checkEnemyArmies@simulation/ai/petra/defenseManager.js:269:4
  m.DefenseManager.prototype.update@simulation/ai/petra/defenseManager.js:59:2
  m.HQ.prototype.update@simulation/ai/petra/headquarters.js:2268:2
  m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:119:3
  m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2

To reproduce, start a game and build any building close to the enemy territory or just attack the enemy.

This is due to this commit: https://code.wildfiregames.com/rP19756 Looks like the problem was pointed out in the review, but after the code change was checked in :s

Change History (1)

comment:1 by mimo, 7 years ago

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 19761:

fix error in rP19756 spotted by Sandarac, fixes #4627

Note: See TracTickets for help on using tickets.