# AI Script Error

**URL:** <https://forums.ageofempires.com/t/ai-script-error/111221>\
**Category:** II - Report a Bug\
**Created:** [December 12, 2020, 9:13pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221 "2020-12-12T21:13:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![InphaseAutumn3](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/inphaseautumn3/32/70958_2.png) [@InphaseAutumn3](https://forums.ageofempires.com/u/InphaseAutumn3)\
**Post date:** [December 12, 2020, 9:13pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/1 "2020-12-12T21:13:53Z")

</div>

### ▶ GAME INFORMATION

- **BUILD #:** 5867313
- **PLATFORM:** Steam
- **OS:** Windows 10

### ▶ ISSUE EXPERIENCED

«Error Player#  
File: Promisory\Buildings.Per2  
Line 2851: ERR2005: Invalid  
Identifier: ERR2004: Missing  
Identifier: Rushprep-Cost»

### ▶ FREQUENCY OF ISSUE

Each game.

### ▶ REPRODUCTION STEPS

Here’s the steps to reproduce the issue:  
I just started a game.

![image](https://cdn.ageofempires.com/aoe-forums/original/3X/9/a/9ab3d33c1c05e97e780a4cbb330bb1f68e127332.jpeg)

---

<div class="post-metadata">

**Author:** ![IDragonXRiderI](https://forums.ageofempires.com/letter_avatar_proxy/v4/letter/i/2acd7d/32.png) [@IDragonXRiderI](https://forums.ageofempires.com/u/IDragonXRiderI)\
**Post date:** [December 20, 2020, 2:02am UTC](https://forums.ageofempires.com/t/ai-script-error/111221/2 "2020-12-20T02:02:32Z")

</div>

I have also been experiencing this exact same issue since the November update. I have attempted to validate game files, uninstall and reinstall, and even modify the buildings.per file to define values in the Rushprep-Cost, fiprep-cost, flushprep-cost, and boomprep-cost lines of the script. This did not fix it, unfortunately. I haven’t been able to play a single-player match since this bug started.

---

<div class="post-metadata">

**Author:** ![PiddlingPants12](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/piddlingpants12/32/29254_2.png) [@PiddlingPants12](https://forums.ageofempires.com/u/PiddlingPants12)\
**Post date:** [January 1, 2021, 5:45pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/3 "2021-01-01T17:45:57Z")

</div>

I have the same problem. Sometimes I can play but it happens only with my personalized maps.

---

<div class="post-metadata">

**Author:** ![UsingSphere7292](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/usingsphere7292/32/54989_2.png) [@UsingSphere7292](https://forums.ageofempires.com/u/UsingSphere7292)\
**Post date:** [January 9, 2021, 8:21am UTC](https://forums.ageofempires.com/t/ai-script-error/111221/4 "2021-01-09T08:21:33Z")

</div>

Exact same problem here

---

<div class="post-metadata">

**Author:** ![PiddlingPants12](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/piddlingpants12/32/29254_2.png) [@PiddlingPants12](https://forums.ageofempires.com/u/PiddlingPants12)\
**Post date:** [January 26, 2021, 4:10am UTC](https://forums.ageofempires.com/t/ai-script-error/111221/5 "2021-01-26T04:10:27Z")

</div>

After new upgrade, now I have this error.

AI script error player 2 file: promisory/init.per2 line 995:ERR2005: invalid identifier: ERR2004: missing identifier: watch-tower-building  
This happens when I try to play a custom scenario and the erroe appears just before it finishes uploading the game.

---

<div class="post-metadata">

**Author:** ![Ajaxann](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/ajaxann/32/46208_2.png) [@Ajaxann](https://forums.ageofempires.com/u/Ajaxann)\
**Post date:** [January 27, 2021, 4:20am UTC](https://forums.ageofempires.com/t/ai-script-error/111221/6 "2021-01-27T04:20:18Z")

</div>

I’m also having this issue on my custom scenario. I also noticed it only happens on the DE AI. The HD and CD version work just fine though and no error occurs.

---

<div class="post-metadata">

**Author:** ![B0DKINARROW](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/b0dkinarrow/32/40036_2.png) [@B0DKINARROW](https://forums.ageofempires.com/u/B0DKINARROW)\
**Post date:** [January 27, 2021, 6:06am UTC](https://forums.ageofempires.com/t/ai-script-error/111221/7 "2021-01-27T06:06:56Z")

</div>

I have the AI Script Error issue as well since the new update. If I start any singleplayer match, regardless of the number of bots in the match, I get this message:

AI Script Error  
Player 2  
File: Promisory\init.per2  
Line 180: ERR2005: Invalid identifier:  
ERR2004: Missing identifier: tc

I observed the AIs and they are completly broken and just start wondeering around with their villagers aimlessly. I tried verifying the game data and also deleted the AI folder once to redownload it via the verification, which both did not help.

EDIT: SOLVED by deinstalling any AI packs. Eventhough the only AI mod I had was the Barbarian AI (and I assumed this doesnt touch the main AI at all), it seemed to have caused the AI script error.  
@InphaseAutumn3 @PiddlingPants12 does this work for you guys too? try removing any mods related to AIs

---

<div class="post-metadata">

**Author:** ![Krambas](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/krambas/32/137917_2.png) [@Krambas](https://forums.ageofempires.com/u/Krambas)\
**Post date:** [January 28, 2021, 5:05pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/8 "2021-01-28T17:05:58Z")

</div>

I have no ai packs and I have the same issue. Tried deleting those files and redownloading them via verify cache and I still get this error.

---

<div class="post-metadata">

**Author:** ![Phantom991596](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/phantom991596/32/51592_2.png) [@Phantom991596](https://forums.ageofempires.com/u/Phantom991596)\
**Post date:** [January 28, 2021, 6:03pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/9 "2021-01-28T18:03:40Z")

</div>

I find these errors while booting up skirmishes. It seems if any player chooses the new civs such error arises and AI goes mental. But no issues when playing without new civs. Even tried playing with Barbarian AI. The new civs are what messing with single player mode.

---

<div class="post-metadata">

**Author:** ![Krambas](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/krambas/32/137917_2.png) [@Krambas](https://forums.ageofempires.com/u/Krambas)\
**Post date:** [January 29, 2021, 10:59am UTC](https://forums.ageofempires.com/t/ai-script-error/111221/10 "2021-01-29T10:59:46Z")

</div>

The civ doesn’t matter, only the type of the ai that I pick. if at least one players uses the de **AI** , i get this error on game start.

---

<div class="post-metadata">

**Author:** ![jk2305](https://forums.ageofempires.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@jk2305](https://forums.ageofempires.com/u/jk2305)\
**Post date:** [January 29, 2021, 1:46pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/11 "2021-01-29T13:46:39Z")

</div>

Since I got the new DLC I get the following, no matter what civs where selected

 ![age2de_error_KI](https://forums.ageofempires.com/uploads/default/original/3X/1/8/181254c84edb6491f6313f75ba3d1cb9d9b76819.png)

---

<div class="post-metadata">

**Author:** ![PiddlingPants12](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/piddlingpants12/32/29254_2.png) [@PiddlingPants12](https://forums.ageofempires.com/u/PiddlingPants12)\
**Post date:** [January 29, 2021, 5:39pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/12 "2021-01-29T17:39:46Z")

</div>

OK. Possible solution. I had all these problems, but I “created” a new file of the scenario just updating with a new: cow, building, rock, etc. I have played many games so far and the error hasn´t appeared againg. Hope this works for you.

---

<div class="post-metadata">

**Author:** ![Krambas](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/krambas/32/137917_2.png) [@Krambas](https://forums.ageofempires.com/u/Krambas)\
**Post date:** [February 1, 2021, 6:10pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/13 "2021-02-01T18:10:32Z")

</div>

Fixed by deleting the whole game and all config/scenario/ai files and whatever else i could find and reinstalling. Nothing else helped 😕

---

<div class="post-metadata">

**Author:** ![legalrick2](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/legalrick2/32/29398_2.png) [@legalrick2](https://forums.ageofempires.com/u/legalrick2)\
**Post date:** [February 4, 2021, 10:52pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/14 "2021-02-04T22:52:48Z")

</div>

I am also getting this error. I cannot play any skirmish game as the enemy just freezes, the only functionally they have left is their scout, all vills are frozen and their TC must be idle.

I have tried to verify integrity of game files, and even uninstalled and reinstalled, neither of these helped.

I’m just hoping the devs put out a patch for this.

---

<div class="post-metadata">

**Author:** ![Dafidius](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/dafidius/32/30102_2.png) [@Dafidius](https://forums.ageofempires.com/u/Dafidius)\
**Post date:** [February 6, 2021, 7:07pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/15 "2021-02-06T19:07:20Z")

</div>

This is so frustrating. I am getting this issue and have tried everything:

- deleting all the files
- reinstalling from scratch
- I have unsubscribed from every mod

Single player currently unplayable

---

<div class="post-metadata">

**Author:** ![Metalchairo](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/metalchairo/32/28813_2.png) [@Metalchairo](https://forums.ageofempires.com/u/Metalchairo)\
**Post date:** [February 11, 2021, 6:41pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/16 "2021-02-11T18:41:32Z")

</div>

what has worked for me is to enter the “ai” folder in  
`"\resources\ _common\ai"`

 ![solucion aoe2](https://forums.ageofempires.com/uploads/default/original/3X/2/d/2dd10dbe7712709bec8d51d07cc740f6afcde2dc.png)  
and delete all the content. I don’t know if this solution works for you

---

<div class="post-metadata">

**Author:** ![Metalchairo](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/metalchairo/32/28813_2.png) [@Metalchairo](https://forums.ageofempires.com/u/Metalchairo)\
**Post date:** [February 11, 2021, 9:38pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/17 "2021-02-11T21:38:13Z")

</div>

Another thing that worked for me was to delete all the contents of the “ai” folder of the installation

 ![solucion aoe2a](https://forums.ageofempires.com/uploads/default/original/3X/a/1/a1a563ce2930e0386265fd3b28bad4196ddedb0f.png)

and then in “steam” in game properties, in the local files option and press “verify files”

 ![solucion aoe2b](https://forums.ageofempires.com/uploads/default/original/3X/4/2/42f29bb881c976a3e6d3735f302ab8cdfff0b91d.png)

AND SOLVED

I hope it works for you

---

<div class="post-metadata">

**Author:** ![legalrick2](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/legalrick2/32/29398_2.png) [@legalrick2](https://forums.ageofempires.com/u/legalrick2)\
**Post date:** [February 11, 2021, 9:55pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/18 "2021-02-11T21:55:57Z")

</div>

That has not worked for me. It must be this update’s files that messed up the AI for some of us.

Edit: New update came out moments ago and it seems to be fixed for me. Let’s hope it doesn’t come back.

---

<div class="post-metadata">

**Author:** ![Dafidius](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/dafidius/32/30102_2.png) [@Dafidius](https://forums.ageofempires.com/u/Dafidius)\
**Post date:** [February 23, 2021, 12:01am UTC](https://forums.ageofempires.com/t/ai-script-error/111221/19 "2021-02-23T00:01:59Z")

</div>

Thank you, that is really helpful!, but I still get the error ☹

---

<div class="post-metadata">

**Author:** ![InphaseAutumn3](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/inphaseautumn3/32/70958_2.png) [@InphaseAutumn3](https://forums.ageofempires.com/u/InphaseAutumn3)\
**Post date:** [April 3, 2021, 7:44pm UTC](https://forums.ageofempires.com/t/ai-script-error/111221/20 "2021-04-03T19:44:11Z")

</div>

I had gotten rid of the issue time ago without any change, but now it came back.

Let me try, though I don’t remember having any AI. Trying Metalchairo’s proposal.

[Next page](https://forums.ageofempires.com/t/ai-script-error/111221.md?page=2)
