anchor.diff:    I, K, Tmp: Integer;
     Barracks: TKMHouseBarracks;
   begin
  -  if gMySpectator.Selected = nil then exit;
  -  if not (gMySpectator.Selected is TKMHouseBarracks) then exit;
  +  if gMySpectator.Selected = nil then
  +    Exit;
  +  if not (gMySpectator.Selected is TKMHouseBarracks) then
  +    Exit;
   
     Barracks := TKMHouseBarracks(gMySpectator.Selected);
   
  
positive.code:   I: Byte;
    School: TKMHouseSchool;
  begin
    if gMySpectator.Selected = nil then exit;
    if not (gMySpectator.Selected is TKMHouseSchool) then exit;
    School := TKMHouseSchool(gMySpectator.Selected);
  
    if (ssRight in Shift) and (Sender = Button_School_Left) then fLastSchoolUnit := 0;
    if (ssRight in Shift) and (Sender = Button_School_Right) then fLastSchoolUnit := High(School_Order);
  
    if (Sender = Button_School_Left) and (fLastSchoolUnit > 0) then Dec(fLastSchoolUnit);
    if (Sender = Button_School_Right) and (fLastSchoolUnit < High(School_Order)) then Inc(fLastSchoolUnit);
  
    if Sender = Button_School_Train then
    begin
  
negative.code:     Button_TH_Train.Hint := gResTexts[TX_HOUSE_BARRACKS_TRAIN_DISABLED_HINT];
  
    if fLastTHUnit < High(TownHall_Order) then
      Image_TH_Right.TexID := gRes.Units[TownHall_Order[fLastTHUnit + 1]].GUIScroll;
  
    ResRow_TH_Cost.Count := TH_TROOP_COST[fLastTHUnit];
  end;
  