Clarify/rewrite a few OutError messages
authorWuzzy <Wuzzy2@mail.ru>
Tue, 17 Jul 2018 21:17:33 +0200
changeset 13501 bdac56fb6f1a
parent 13500 d9f9e66543d7
child 13502 99a99dbfbf6d
Clarify/rewrite a few OutError messages
hedgewars/uIO.pas
hedgewars/uLand.pas
hedgewars/uLandObjects.pas
--- a/hedgewars/uIO.pas	Tue Jul 17 20:13:41 2018 +0200
+++ b/hedgewars/uIO.pas	Tue Jul 17 21:17:33 2018 +0200
@@ -515,7 +515,7 @@
         end
     else
         if CurrentTeam^.ExtDriven then
-            OutError('got /put while not being in choose target mode', false)
+            OutError('Got /put while not being in choose target mode', false)
 end;
 
 procedure initModule;
--- a/hedgewars/uLand.pas	Tue Jul 17 20:13:41 2018 +0200
+++ b/hedgewars/uLand.pas	Tue Jul 17 21:17:33 2018 +0200
@@ -314,7 +314,7 @@
             end else getRandom(1);
 
         case cTemplateFilter of
-        0: OutError('Ask unC0Rr about what you did wrong', true);
+        0: OutError('Error selecting TemplateFilter. Ask unC0Rr about what you did wrong', true);
         1: SelectTemplate:= SmallTemplates[getrandom(TemplateCounts[cTemplateFilter])];
         2: SelectTemplate:= MediumTemplates[getrandom(TemplateCounts[cTemplateFilter])];
         3: SelectTemplate:= LargeTemplates[getrandom(TemplateCounts[cTemplateFilter])];
--- a/hedgewars/uLandObjects.pas	Tue Jul 17 20:13:41 2018 +0200
+++ b/hedgewars/uLandObjects.pas	Tue Jul 17 21:17:33 2018 +0200
@@ -647,9 +647,9 @@
 procedure CheckRect(Width, Height, x, y, w, h: LongWord);
 begin
     if (x + w > Width) then
-        OutError('Object''s rectangle exceeds image: x + w (' + inttostr(x) + ' + ' + inttostr(w) + ') > Width (' + inttostr(Width) + ')', true);
+        OutError('Broken theme. Object''s rectangle exceeds image: x + w (' + inttostr(x) + ' + ' + inttostr(w) + ') > Width (' + inttostr(Width) + ')', true);
     if (y + h > Height) then
-        OutError('Object''s rectangle exceeds image: y + h (' + inttostr(y) + ' + ' + inttostr(h) + ') > Height (' + inttostr(Height) + ')', true);
+        OutError('Broken theme. Object''s rectangle exceeds image: y + h (' + inttostr(y) + ' + ' + inttostr(h) + ') > Height (' + inttostr(Height) + ')', true);
 end;
 
 procedure ReadRect(var rect: TSDL_Rect; var s: ShortString);
@@ -901,7 +901,7 @@
             Maxcnt:= StrToInt(Trim(Copy(s, 1, Pred(i))));
             Delete(s, 1, i);
             if (Maxcnt < 1) or (Maxcnt > MAXTHEMEOBJECTS) then
-                OutError('Object''s max count should be between 1 and '+ inttostr(MAXTHEMEOBJECTS) +' (it was '+ inttostr(Maxcnt) +').', true);
+                OutError('Broken theme. Object''s max. count should be between 1 and '+ inttostr(MAXTHEMEOBJECTS) +' (it was '+ inttostr(Maxcnt) +').', true);
             ChecksumLandObjectImage(Surf);
             ChecksumLandObjectImage(Mask);
 
@@ -920,7 +920,7 @@
             end;
 
             if inrectcnt > MAXOBJECTRECTS then
-                OutError('Object''s inland rectangle count should be no more than '+ inttostr(MAXOBJECTRECTS) +' (it was '+ inttostr(inrectcnt) +').', true);
+                OutError('Broken theme. Object''s inland rectangle count should be no more than '+ inttostr(MAXOBJECTRECTS) +' (it was '+ inttostr(inrectcnt) +').', true);
 
             for ii:= 0 to Pred(inrectcnt) do
                 ReadRect(inland[ii], s);
@@ -930,7 +930,7 @@
             Delete(s, 1, i);
 
             if outrectcnt > MAXOBJECTRECTS then
-                OutError('Object''s outland rectangle count should be no more than '+ inttostr(MAXOBJECTRECTS) +' (it was '+ inttostr(outrectcnt) +').', true);
+                OutError('Broken theme. Object''s outland rectangle count should be no more than '+ inttostr(MAXOBJECTRECTS) +' (it was '+ inttostr(outrectcnt) +').', true);
 
             for ii:= 0 to Pred(outrectcnt) do
                 ReadRect(outland[ii], s);
@@ -944,13 +944,13 @@
             if ThemeObjects.objs[ii].Name = nameRef then with ThemeObjects.objs[ii] do
                 begin
                 if anchorcnt <> 0 then
-                    OutError('Duplicate anchors declaration for ' + nameRef, true);
+                    OutError('Broken theme. Duplicate anchors declaration for object ' + nameRef, true);
                 Delete(s, 1, i);
                 i:= Pos(',', s);
                 anchorcnt:= StrToInt(Trim(Copy(s, 1, Pred(i))));
                 Delete(s, 1, i);
                 if anchorcnt > MAXOBJECTRECTS then
-                    OutError('Object''s anchor rectangle count should be no more than '+ inttostr(MAXOBJECTRECTS) +' (it was '+ inttostr(anchorcnt) +').', true);
+                    OutError('Broken theme. Object''s anchor rectangle count should be no more than '+ inttostr(MAXOBJECTRECTS) +' (it was '+ inttostr(anchorcnt) +').', true);
                 for t:= 0 to Pred(anchorcnt) do
                     ReadRect(anchors[t], s);
                 break
@@ -964,13 +964,13 @@
             if ThemeObjects.objs[ii].Name = nameRef then with ThemeObjects.objs[ii] do
             begin
                 if overlaycnt <> 0 then
-                    OutError('Duplicate overlays declaration for ' + nameRef, true);
+                    OutError('Broken theme. Duplicate overlays declaration for object ' + nameRef, true);
                 Delete(s, 1, i);
                 i:= Pos(',', s);
                 overlaycnt:= StrToInt(Trim(Copy(s, 1, Pred(i))));
                 Delete(s, 1, i);
                 if overlaycnt > MAXOBJECTRECTS then
-                    OutError('Object''s overlay count should be no more than '+ inttostr(MAXOBJECTRECTS) +' (it was '+ inttostr(overlaycnt) +').', true);
+                    OutError('Broken theme. Object''s overlay count should be no more than '+ inttostr(MAXOBJECTRECTS) +' (it was '+ inttostr(overlaycnt) +').', true);
                 for t:= 0 to Pred(overlaycnt) do
                     ReadOverlay(overlays[t], s);
                 break