anchor.diff:      Assert((NewX <= MAX_MAP_SIZE) and (NewY <= MAX_MAP_SIZE), 'Can''t open the map cos it has too big dimensions');
       fMapX := NewX;
       fMapY := NewY;
  -    for i:=1 to fMapX*fMapY do
  -    begin
  -      S.Read(fMapPreview[i].TileID);
  +    for I := 1 to fMapX * fMapY do
  +    begin
  +      S.Read(fMapPreview[I].TileID);
         S.Seek(1, soFromCurrent);
  -      S.Read(fMapPreview[i].TileHeight); //Height (for lighting)
  +      S.Read(fMapPreview[I].TileHeight); //Height (for lighting)
         S.Seek(20, soFromCurrent);
       end;
     finally
  
positive.code:                                 fPlayers[fLastPlayer].Goals.AddGoal(glt_Victory,TGoalCondition(P[0]),TGoalStatus(P[1]),0,P[2],fRemap[P[3]])
                                else
                                  AddError('Add_Goal for non existing player');
      ct_AddLostGoal:     if (fParsingMode <> mpm_Preview) then
                          if fLastPlayer >= 0 then
                            //If the condition is time then P[3] is the time, else it is player ID
                            if TGoalCondition(P[0]) = gc_Time then
                              fPlayers[fLastPlayer].Goals.AddGoal(glt_Survive,TGoalCondition(P[0]),TGoalStatus(P[1]),P[3],P[2],-1)
  
negative.code: end;
  
  
  //Load terrain data into liteweight structure, take only what we need for preview
  procedure TMissionParserPreview.LoadMapData(const aFileName: string);
  var
    I: Integer;
    S: TKMemoryStream;
    NewX, NewY: Integer;
  begin
    S := TKMemoryStream.Create;
    try
  