hedgewars/uCommandHandlers.pas
changeset 8370 0c79946e96f8
parent 8145 6408c0ba4ba1
child 8444 75db7bb8dce8
child 8556 6f4c2711baa6
equal deleted inserted replaced
8369:31033e521653 8370:0c79946e96f8
    87     SendIPC(_S'H');
    87     SendIPC(_S'H');
    88     GameState:= gsExit
    88     GameState:= gsExit
    89 end;
    89 end;
    90 
    90 
    91 procedure chCheckProto(var s: shortstring);
    91 procedure chCheckProto(var s: shortstring);
    92 var i, c: LongInt;
    92 var i: LongInt;
    93 begin
    93 begin
    94     if isDeveloperMode then
    94     if isDeveloperMode then
    95         begin
    95         begin
    96         val(s, i, c);
    96         i:= StrToInt(s);
    97         TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    97         TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    98         TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    98         TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    99         end
    99         end
   100 end;
   100 end;
   101 
   101