Вниз
Скачать: CL | DM;

Проблема   Найти похожие ветки 

 
Bast   (2007-09-23 21:09) [0]

Здравствуйте! Незнаю почему но данный код отказывается работать пишет типа: 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.


 
Anatoly Podgoretsky ©   (2007-09-23 21:14) [1]

> Bast  (23.09.2007 21:09:00)  [0]

А иксу кто будет присваивать значение перед использованием, Пушкин?


 
Yogan   (2007-09-23 21:15) [2]

list out of bounds (999145...)


 
Bast   (2007-09-23 21:17) [3]

Спасибо


 
Dmitro ©   (2007-09-26 01:28) [4]

Советую строчку:
If (not z=0) and (not x=0) and (not c=0) then
заменить на:
if z + x + c > 2 then



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.014 c
2-1191220673
Дмитрий Иванович
2007-10-01 10:37
2007.10.21
Проблема в Interbase


6-1171884932
inex
2007-02-19 14:35
2007.10.21
сетевой файловый менеджер


6-1171997469
Roman777
2007-02-20 21:51
2007.10.21
Автоматическая авторизация


2-1190968778
MM
2007-09-28 12:39
2007.10.21
счетчик


2-1191228928
F@T@L_Err0r
2007-10-01 12:55
2007.10.21
Завершение работы windows




   Наверх