There is a particularly nasty bug in the script system related to the CALL_GAMEINIT event. When it is called, several of the in-game data structures are not properly set up yet, so some functions will fail mysteriously. Calling functions from this event is therefore not recommended.
The script event CALL_START_NEXT_LEVEL has been used throughout the campaign scripting, but never for skirmish. So what I did was to add code to the forthcoming 2.3 release candidate to fire off this event once the map is fully loaded. You can put the things you perhaps had planned for CALL_GAMEINIT in this event instead.
In related news, I fixed the script bug when getNearestGateway() is called on a map with no gateways. It should also be in the 2.3 release candidate.
New script event for skirmish - CALL_START_NEXT_LEVEL
Re: New script event for skirmish - CALL_START_NEXT_LEVEL
Good idea opening this forum. Thanks for fixing the getNearestGateway().