fabio Posted July 31, 2012 Report Share Posted July 31, 2012 I get this error on current svn, default map:WARNING: JavaScript warning: simulation/ai/common-api-v2/entity.js line 125reference to undefined property this._template.Builder.Entities._stringERROR: JavaScript error: simulation/ai/common-api-v2/entity.js line 125TypeError: this._template.Builder.Entities._string is undefined ()@simulation/ai/common-api-v2/entity.js:125 ([object Object],"4623",[object Object])@simulation/ai/qbot/gamestate.js:283 ([object Object])@simulation/ai/common-api-v2/entitycollection.js:79 ("structures/maur_house")@simulation/ai/qbot/gamestate.js:281 ([object Object])@simulation/ai/qbot/plan-building.js:23 ([object Object])@simulation/ai/qbot/queue-manager.js:282 ()@simulation/ai/qbot/qbot.js:108 ([object Object])@simulation/ai/common-api-v2/base.js:122 @:0 Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 31, 2012 Report Share Posted July 31, 2012 I've got this too sometimes, though not on every map. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 31, 2012 Report Share Posted July 31, 2012 I wonder if that could be the Mauryan support elephant, I changed it to be able to repair but not place new foundations, so likely the AI must be updated to handle this case (I didn't know the AI even supported that unit!) Quote Link to comment Share on other sites More sharing options...
fabio Posted July 31, 2012 Author Report Share Posted July 31, 2012 This error happens just after starting the game, also note that I am using system spidermonkey. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted July 31, 2012 Report Share Posted July 31, 2012 It's because the AI can't handle the Mauryans yet, I believe. If you change yourself to play as the Mauryans and the AI as the Gauls, then there is no error. Quote Link to comment Share on other sites More sharing options...
wraitii Posted August 2, 2012 Report Share Posted August 2, 2012 I wonder if that could be the Mauryan support elephant, I changed it to be able to repair but not place new foundations, so likely the AI must be updated to handle this case (I didn't know the AI even supported that unit!)Reading from the log error, this happens because of a call to the common-api and the function "buildableEntities()". This function handles the case where "this._template.Builder" is undefined, but on the support elephant, it's defined, and it expects "this._template.Builder.Entities._string" to be defined too, when it's in fact not.A simple fix would be to replace this function by this:buildableEntities: function() { if (!this._template.Builder || !this._template.Builder.Entities._string) return undefined; var civ = this.civ(); var templates = this._template.Builder.Entities._string.replace(/\{civ\}/g, civ).split(/\s+/); return templates; // TODO: map to Entity?},Another possibility would be to change the mauryan support elephant template to this, but I'm not sure that'd work:<Builder> <Rate>1.0</Rate> <Entities datatype="tokens"></Entities></Builder>I'm not sure how qbot would handle the Mauryans anyway, but that would be fixed. Quote Link to comment Share on other sites More sharing options...
Deiz Posted August 2, 2012 Report Share Posted August 2, 2012 I beat you to the punch and did the former in r12257.quantumstate is aware that qBot doesn't do anything with the worker elephant at the moment, and said he'll fix it when he has time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.