hedgewars/uLocale.pas
branchwebgl
changeset 9956 0c6286c67b8d
parent 9127 e350500c4edb
child 10015 4feced261c68
equal deleted inserted replaced
9954:bf51bc7e2808 9956:0c6286c67b8d
    61             continue;
    61             continue;
    62         if (s[1] < '0') or (s[1] > '9') then
    62         if (s[1] < '0') or (s[1] > '9') then
    63             continue;
    63             continue;
    64         TryDo(Length(s) > 6, 'Load locale: empty string', true);
    64         TryDo(Length(s) > 6, 'Load locale: empty string', true);
    65         val(s[1]+s[2], a{$IFNDEF PAS2C}, c{$ENDIF});
    65         val(s[1]+s[2], a{$IFNDEF PAS2C}, c{$ENDIF});
    66         TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true);
    66         {$IFNDEF PAS2C}TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true);{$ENDIF}
    67         TryDo(s[3] = ':', 'Load locale: ":" expected', true);
    67         TryDo(s[3] = ':', 'Load locale: ":" expected', true);
    68         val(s[4]+s[5], b{$IFNDEF PAS2C}, c{$ENDIF});
    68         val(s[4]+s[5], b{$IFNDEF PAS2C}, c{$ENDIF});
    69         TryDo(c = 0, 'Load locale: numbers should be two-digit' + s, true);
    69         {$IFNDEF PAS2C}TryDo(c = 0, 'Load locale: numbers should be two-digit' + s, true);{$ENDIF}
    70         TryDo(s[6] = '=', 'Load locale: "=" expected', true);
    70         TryDo(s[6] = '=', 'Load locale: "=" expected', true);
    71         Delete(s, 1, 6);
    71         Delete(s, 1, 6);
    72         case a of
    72         case a of
    73             0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then
    73             0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then
    74                 trammo[TAmmoStrId(b)]:= s;
    74                 trammo[TAmmoStrId(b)]:= s;