Changes

revert to what works
Line 623: Line 623:  
             if i ~= nil then
 
             if i ~= nil then
 
                 count = count + 1
 
                 count = count + 1
                 if (count == 3 or count == 9) and str:sub(i+1,#str) ~= "" then
+
                 if count % 3 == 0 and str ~= nil then
 
                 str = str:sub(0,i) .. "<br>" .. str:sub(i+1,#str)
 
                 str = str:sub(0,i) .. "<br>" .. str:sub(i+1,#str)
            end
+
                end
            if count == 6 and str:sub(i+1,#str) ~= "" then -- >6 ships --> combined fleet
  −
            str = "<center><b>Main Fleet</b></center>" .. str:sub(0,i) .. "<center><b>Escort Fleet</b></center>" .. str:sub(i+1,#str)
  −
        end
   
             end
 
             end
 
         end
 
         end
5,421

edits