diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 53ebee4a6d..45d35657b2 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -542,14 +542,16 @@ static inline bool MayHaveBridgeAbove(TileIndex t) */ static void StartScripts() { - /* Start the GameScript. */ - Game::StartNew(); + /* Script debug window requires AIs to be started before trying to start GameScript. */ /* Start the AIs. */ for (const Company *c : Company::Iterate()) { if (Company::IsValidAiID(c->index)) AI::StartNew(c->index, false); } + /* Start the GameScript. */ + Game::StartNew(); + ShowAIDebugWindowIfAIError(); }