Opened 12 years ago

Closed 12 years ago

#1402 closed defect (fixed)

ERROR: JavaScript error: simulation/ai/qbot/worker.js line 71

Reported by: fabio Owned by: Jonathan Waller
Priority: Should Have Milestone: Alpha 10
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by fabio)

While playing "Third Macedonian War" on current r11849 I get a lot of these:

ERROR: JavaScript error: simulation/ai/qbot/worker.js line 71
TypeError: ent.resourceSupplyType() is undefined
  ([object Object])@simulation/ai/qbot/worker.js:71
  ([object Object])@simulation/ai/qbot/worker.js:53
  ([object Object])@simulation/ai/qbot/worker.js:33
  ([object Object],"829",[object Object])@simulation/ai/qbot/economy.js:495
  ((function (ent) {"use strict";if (!ent.getMetadata("worker-object")) {ent.setMetadata("worker-object", new Worker(ent));}ent.getMetadata("worker-object").update(gameState);}))@simulation/ai/common-api-v2/entitycollection.js:104
  ([object Object],[object Object],[object Array])@simulation/ai/qbot/economy.js:491
  ()@simulation/ai/qbot/qbot.js:103
  ([object Object])@simulation/ai/common-api-v2/base.js:122
  @:0
ERROR: JavaScript error: simulation/ai/qbot/worker.js line 71
TypeError: ent.resourceSupplyType() is undefined
  ([object Object])@simulation/ai/qbot/worker.js:71
  ([object Object])@simulation/ai/qbot/worker.js:62
  ([object Object])@simulation/ai/qbot/worker.js:33
  ([object Object],"829",[object Object])@simulation/ai/qbot/economy.js:495
  ((function (ent) {"use strict";if (!ent.getMetadata("worker-object")) {ent.setMetadata("worker-object", new Worker(ent));}ent.getMetadata("worker-object").update(gameState);}))@simulation/ai/common-api-v2/entitycollection.js:104
  ([object Object],[object Object],[object Array])@simulation/ai/qbot/economy.js:491
  ()@simulation/ai/qbot/qbot.js:103
  ([object Object])@simulation/ai/common-api-v2/base.js:122
  @:0
ERROR: JavaScript error: simulation/ai/qbot/worker.js line 71
TypeError: ent.resourceSupplyType() is undefined
  ([object Object])@simulation/ai/qbot/worker.js:71
  ([object Object])@simulation/ai/qbot/worker.js:62
  ([object Object])@simulation/ai/qbot/worker.js:33
  ([object Object],"829",[object Object])@simulation/ai/qbot/economy.js:495
  ((function (ent) {"use strict";if (!ent.getMetadata("worker-object")) {ent.setMetadata("worker-object", new Worker(ent));}ent.getMetadata("worker-object").update(gameState);}))@simulation/ai/common-api-v2/entitycollection.js:104
  ([object Object],[object Object],[object Array])@simulation/ai/qbot/economy.js:491
  ()@simulation/ai/qbot/qbot.js:103
  ([object Object])@simulation/ai/common-api-v2/base.js:122
  @:0
ERROR: JavaScript error: simulation/ai/qbot/worker.js line 71
TypeError: ent.resourceSupplyType() is undefined
  ([object Object])@simulation/ai/qbot/worker.js:71
  ([object Object])@simulation/ai/qbot/worker.js:62
  ([object Object])@simulation/ai/qbot/worker.js:33
  ([object Object],"829",[object Object])@simulation/ai/qbot/economy.js:495
  ((function (ent) {"use strict";if (!ent.getMetadata("worker-object")) {ent.setMetadata("worker-object", new Worker(ent));}ent.getMetadata("worker-object").update(gameState);}))@simulation/ai/common-api-v2/entitycollection.js:104
  ([object Object],[object Object],[object Array])@simulation/ai/qbot/economy.js:491
  ()@simulation/ai/qbot/qbot.js:103
  ([object Object])@simulation/ai/common-api-v2/base.js:122
  @:0
ERROR: JavaScript error: simulation/ai/qbot/worker.js line 71
TypeError: ent.resourceSupplyType() is undefined
  ([object Object])@simulation/ai/qbot/worker.js:71
  ([object Object])@simulation/ai/qbot/worker.js:62
  ([object Object])@simulation/ai/qbot/worker.js:33
  ([object Object],"829",[object Object])@simulation/ai/qbot/economy.js:495
  ((function (ent) {"use strict";if (!ent.getMetadata("worker-object")) {ent.setMetadata("worker-object", new Worker(ent));}ent.getMetadata("worker-object").update(gameState);}))@simulation/ai/common-api-v2/entitycollection.js:104
  ([object Object],[object Object],[object Array])@simulation/ai/qbot/economy.js:491
  ()@simulation/ai/qbot/qbot.js:103
  ([object Object])@simulation/ai/common-api-v2/base.js:122
  @:0

Change History (2)

comment:1 by fabio, 12 years ago

Description: modified (diff)
Milestone: BacklogAlpha 10

comment:2 by Jonathan Waller, 12 years ago

Owner: set to Jonathan Waller
Resolution: fixed
Status: newclosed

In 11850:

Added check for existance of ent.resourceSupplyType(). Fixes #1402

Note: See TracTickets for help on using tickets.