Показать сообщение отдельно
  #15  
Старый 14.11.2009, 16:21
bleeep bleeep вне форума
Прохожий
 
Регистрация: 28.06.2009
Сообщения: 37
Репутация: 10
По умолчанию

Всем привет, у меня такой вопрос. Выскакивает ошибка(скрин в аттаче). И ссылается на участок кода
Код:
procedure TForm7.vopros(a:byte);

begin
   Memo1.Lines[0]:=ListBox1.Items[a*8];
   if strtoint(ListBox1.Items[a*8+1])=4 then
    begin
    RadioButton1.Visible:=true;
    RadioButton2.Visible:=true;
    RadioButton3.Visible:=true;
    RadioButton4.Visible:=true;
    RadioButton1.Caption:=ListBox1.Items[a*8+3];
    RadioButton2.Caption:=ListBox1.Items[a*8+4];
    RadioButton3.Caption:=ListBox1.Items[a*8+5];
    RadioButton4.Caption:=ListBox1.Items[a*8+6];
    end;
   if strtoint(ListBox1.Items[a*8+1])=3 then
    begin
    RadioButton1.Visible:=true;
    RadioButton2.Visible:=true;
    RadioButton3.Visible:=true;
    RadioButton4.Visible:=false;
    RadioButton1.Caption:=ListBox1.Items[a*8+3];
    RadioButton2.Caption:=ListBox1.Items[a*8+4];
    RadioButton3.Caption:=ListBox1.Items[a*8+5];
    end;
   if strtoint(ListBox1.Items[a*8+1])=2 then
    begin
    RadioButton1.Visible:=true;
    RadioButton2.Visible:=true;
    RadioButton3.Visible:=false;
    RadioButton4.Visible:=false;
    RadioButton1.Caption:=ListBox1.Items[a*8+3];
    RadioButton2.Caption:=ListBox1.Items[a*8+4];
    end;
    RadioButton1.Checked:=false;
    RadioButton2.Checked:=false;
    RadioButton3.Checked:=false;
    RadioButton4.Checked:=false;
end;
Я не пойму из за чего, но она не всегда выскакивает. Суть программы - тест. Вопросы берутся из файла random'ом. Структура файла с вопросами:
PHP код:
Вопрос
Количество вопросов
Номер правильного ответа
ответ1
ответ2
ответ3
ответ4

Вопрос2
... 
Изображения
Тип файла: jpg точечный рисунок.jpg (59.5 Кбайт, 9 просмотров)
__________________
"I remember the good old days, when computers were
mainframes, analysts were magicians,and programmers
punced cards..."
Ответить с цитированием