Auto-translated
Fixed and tested; everything works.
Update from 02/27/2018, version 3.1.1
Fixed the script for portal appearance on the final stage of the scenario (game freeze; thanks to Vasik).
Download The Last Frontier, version 3.1.1 final
Did you take an old map and do something to it, increasing the size, for example, from 176x176 to 216x216 (if so, could you tell me how?), or did you create a new map with a larger size?