hedgewars/uLocale.pas
changeset 10123 64e72781d344
parent 10122 cefede760264
child 10127 7f29a65aa1e4
equal deleted inserted replaced
10122:cefede760264 10123:64e72781d344
    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, c);
    65         val(s[1]+s[2], a, c);
    66         TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true);
    66         TryDo(c = 0, ansistring('Load locale: numbers should be two-digit: ') + s, true);
    67         TryDo(s[3] = ':', 'Load locale: ":" expected', true);
    67         TryDo(s[3] = ':', 'Load locale: ":" expected', true);
    68         val(s[4]+s[5], b, c);
    68         val(s[4]+s[5], b, c);
    69         TryDo(c = 0, 'Load locale: numbers should be two-digit' + s, true);
    69         TryDo(c = 0, ansistring('Load locale: numbers should be two-digit: ') + s, true);
    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;