51 readln(f, s); |
51 readln(f, s); |
52 if Length(s) = 0 then continue; |
52 if Length(s) = 0 then continue; |
53 if s[1] = ';' then continue; |
53 if s[1] = ';' then continue; |
54 TryDo(Length(s) > 6, 'Load locale: empty string', true); |
54 TryDo(Length(s) > 6, 'Load locale: empty string', true); |
55 val(s[1]+s[2], a, c); |
55 val(s[1]+s[2], a, c); |
56 TryDo(c = 0, 'Load locale: numbers should be two-digit', true); |
56 TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true); |
57 TryDo(s[3] = ':', 'Load locale: ":" expected', true); |
57 TryDo(s[3] = ':', 'Load locale: ":" expected', true); |
58 val(s[4]+s[5], b, c); |
58 val(s[4]+s[5], b, c); |
59 TryDo(c = 0, 'Load locale: numbers should be two-digit', true); |
59 TryDo(c = 0, 'Load locale: numbers should be two-digit' + s, true); |
60 TryDo(s[6] = '=', 'Load locale: "=" expected', true); |
60 TryDo(s[6] = '=', 'Load locale: "=" expected', true); |
61 Delete(s, 1, 6); |
61 Delete(s, 1, 6); |
62 case a of |
62 case a of |
63 0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammo[TAmmoStrId(b)]:= s; |
63 0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammo[TAmmoStrId(b)]:= s; |
64 1: if (b >=0) and (b <= ord(High(TMsgStrId))) then trmsg[TMsgStrId(b)]:= s; |
64 1: if (b >=0) and (b <= ord(High(TMsgStrId))) then trmsg[TMsgStrId(b)]:= s; |