![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Проблема
Bast © (2007-09-23 21:09:00)Здравствуйте! Незнаю почему но данный код отказывается работать пишет типа: index bound out... размер файла 23мб.
procedure TForm1.Button1Click(Sender: TObject);
var
gmshop: Tstrings;
a:integer;
z,x,c:integer;
v,b,n:integer;
begin
gmshop:=Tstringlist.Create;
gmshop.LoadFromFile(form1.Edit1.Text);
for a:=0 to gmshop.Count-1 do
begin
z:=pos('armor', gmshop[x]);
x:=pos('slot_bit_type={gloves}', gmshop[x]);
c:=pos('crystal_type=none', gmshop[x]);
If (not z=0) and (not x=0) and (not c=0) then
begin
v:=pos('[', gmshop[x]);
b:=pos(']', gmshop[x]);
form1.Memo1.Lines.Add(copy(gmshop[x], v+1, b-v+1));
end;
end;
gmshop.Free;
end;
end.
Dmitro (2007-09-26 01:28:00) [1]Советую строчку:
If (not z=0) and (not x=0) and (not c=0) then
заменить на:
if z + x + c > 2 then
Bast (2007-09-23 21:17:00) [2]Спасибо
Yogan (2007-09-23 21:15:00) [3]list out of bounds (999145...)
Anatoly Podgoretsky (2007-09-23 21:14:00) [4]> Bast (23.09.2007 21:09:00) [0]
А иксу кто будет присваивать значение перед использованием, Пушкин?