60 if Length(s) = 0 then |
60 if Length(s) = 0 then |
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{$IFNDEF PAS2C}, c{$ENDIF}); |
66 TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true); |
66 TryDo(c = 0, '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{$IFNDEF PAS2C}, c{$ENDIF}); |
69 TryDo(c = 0, 'Load locale: numbers should be two-digit' + s, true); |
69 TryDo(c = 0, '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 |