more details in chCheckProto 0.9.16
authorkoda
Sun, 16 Oct 2011 18:37:57 +0200 (2011-10-16)
branch0.9.16
changeset 6001 24b3a7ba3884
parent 5999 dad168522e3b
child 6003 74431bf4c632
more details in chCheckProto
hedgewars/uCommandHandlers.pas
--- a/hedgewars/uCommandHandlers.pas	Fri Oct 14 19:00:31 2011 +0200
+++ b/hedgewars/uCommandHandlers.pas	Sun Oct 16 18:37:57 2011 +0200
@@ -85,13 +85,13 @@
 procedure chCheckProto(var s: shortstring);
 var i, c: LongInt;
 begin
-if isDeveloperMode then
-begin
-val(s, i, c);
-if (c <> 0) or (i = 0) then exit;
-TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old', true);
-TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new', true)
-end
+    if isDeveloperMode then
+        begin
+        val(s, i, c);
+        if (c <> 0) or (i = 0) then exit;
+        TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
+        TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
+    end
 end;
 
 procedure chTeamLocal(var s: shortstring);