hedgewars/uCommandHandlers.pas
changeset 6131 4e8816cf9459
parent 6088 47d1b04003d1
parent 6001 24b3a7ba3884
child 6224 42b256eca362
child 6245 6df227b5e4c9
equal deleted inserted replaced
6130:026fd01a5e2c 6131:4e8816cf9459
    83 end;
    83 end;
    84 
    84 
    85 procedure chCheckProto(var s: shortstring);
    85 procedure chCheckProto(var s: shortstring);
    86 var i, c: LongInt;
    86 var i, c: LongInt;
    87 begin
    87 begin
    88 if isDeveloperMode then
    88     if isDeveloperMode then
    89 begin
    89         begin
    90 val(s, i, c);
    90         val(s, i, c);
    91 if (c <> 0) or (i = 0) then exit;
    91         if (c <> 0) or (i = 0) then exit;
    92 TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old', true);
    92         TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    93 TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new', true)
    93         TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    94 end
    94     end
    95 end;
    95 end;
    96 
    96 
    97 procedure chTeamLocal(var s: shortstring);
    97 procedure chTeamLocal(var s: shortstring);
    98 begin
    98 begin
    99 s:= s; // avoid compiler hint
    99 s:= s; // avoid compiler hint