Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.10.02;
Скачать: CL | DM;

Вниз

Не могу разобраться...   Найти похожие ветки 

 
Serfy ©   (2005-08-23 09:01) [0]

странно, программа работала нормально и тут начинает выдовать ошибки одну за другой ей не нравяться процедуры, пишет ошибку

[Error] Unit1.pas(451): Statement expected but "PROCEDURE" found
[Error] Unit1.pas(662): Statement expected but "PROCEDURE" found


 
Savek   (2005-08-23 09:06) [1]

Выкладывай код


 
alex_***   (2005-08-23 09:06) [2]

end забыл, видимо


 
Serfy ©   (2005-08-23 10:18) [3]

код целиком не влазеет
1 часть:
unit Unit1;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, StdCtrls, Unit4, jpeg, ExtCtrls, Buttons;

type
 TForm1 = class(TForm)
   Edit1: TEdit;
   Edit2: TEdit;
   Edit3: TEdit;
   Image1: TImage;
   Label1: TLabel;
   Label2: TLabel;
   Label10: TLabel;
   Label3: TLabel;
   Label4: TLabel;
   Label11: TLabel;
   Label12: TLabel;
   Label13: TLabel;
   Label14: TLabel;
   Label15: TLabel;
   Label16: TLabel;
   Label17: TLabel;
   Label18: TLabel;
   Label19: TLabel;
   Label7: TLabel;
   Label8: TLabel;
   Label9: TLabel;
   Label20: TLabel;
   Label21: TLabel;
   Label22: TLabel;
   Label23: TLabel;
   Label24: TLabel;
   Label25: TLabel;
   Label6: TLabel;
   Label5: TLabel;
   SpeedButton1: TSpeedButton;
   Button30: TSpeedButton;
   Button1: TSpeedButton;
   Button20: TSpeedButton;
   Button32: TSpeedButton;
   Button33: TSpeedButton;
   Button34: TSpeedButton;
   Button35: TSpeedButton;
   Button36: TSpeedButton;
   Button37: TSpeedButton;
   Button38: TSpeedButton;
   Button39: TSpeedButton;
   Button40: TSpeedButton;
   Button21: TSpeedButton;
   Button22: TSpeedButton;
   Button23: TSpeedButton;
   Button24: TSpeedButton;
   Button25: TSpeedButton;
   Button26: TSpeedButton;
   Button27: TSpeedButton;
   Button28: TSpeedButton;
   Button29: TSpeedButton;
   Button3: TSpeedButton;
   Button5: TSpeedButton;
   Button7: TSpeedButton;
   Button9: TSpeedButton;
   Button11: TSpeedButton;
   Button13: TSpeedButton;
   Button15: TSpeedButton;
   Button17: TSpeedButton;
   Button2: TSpeedButton;
   Button19: TSpeedButton;
   Button4: TSpeedButton;
   Button6: TSpeedButton;
   Button8: TSpeedButton;
   Button10: TSpeedButton;
   Button12: TSpeedButton;
   Button14: TSpeedButton;
   Button16: TSpeedButton;
   Button18: TSpeedButton;


 
Serfy ©   (2005-08-23 10:19) [4]

2 часть:

   procedure Button1Click(Sender: TObject);
   procedure Button5Click(Sender: TObject);
   procedure Button7Click(Sender: TObject);
   procedure Button9Click(Sender: TObject);
   procedure Button11Click(Sender: TObject);
   procedure Button13Click(Sender: TObject);
   procedure Button15Click(Sender: TObject);
   procedure Button17Click(Sender: TObject);
   procedure Button19Click(Sender: TObject);
   procedure Button3Click(Sender: TObject);
   procedure Button30Click(Sender: TObject);
   procedure Button31Click(Sender: TObject);
   procedure Button32Click(Sender: TObject);
   procedure Button21Click(Sender: TObject);
   procedure Button33Click(Sender: TObject);
   procedure Button34Click(Sender: TObject);
   procedure Button35Click(Sender: TObject);
   procedure Button36Click(Sender: TObject);
   procedure Button37Click(Sender: TObject);
   procedure Button38Click(Sender: TObject);
   procedure Button39Click(Sender: TObject);
   procedure Button40Click(Sender: TObject);
   procedure Button22Click(Sender: TObject);
   procedure Button23Click(Sender: TObject);
   procedure Button24Click(Sender: TObject);
   procedure Button25Click(Sender: TObject);
   procedure Button26Click(Sender: TObject);
   procedure Button27Click(Sender: TObject);
   procedure Button28Click(Sender: TObject);
   procedure Button29Click(Sender: TObject);
   procedure SpeedButton1Click(Sender: TObject);
   procedure Button20Click(Sender: TObject);
   procedure Button2Click(Sender: TObject);
   procedure Button4Click(Sender: TObject);
   procedure Button6Click(Sender: TObject);
   procedure Button8Click(Sender: TObject);
   procedure Button10Click(Sender: TObject);
   procedure Button12Click(Sender: TObject);
   procedure Button14Click(Sender: TObject);
   procedure Button16Click(Sender: TObject);
   procedure Button18Click(Sender: TObject);


 
Serfy ©   (2005-08-23 10:23) [5]

3 часть:
 private
   { Private declarations }
 public
   { Public declarations }
 end;

var
 Form1: TForm1;

implementation

uses Unit3;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
label 1;
begin
unit4.q:=0;
unit4.w:=0;
Label5.Caption:=inttostr(q);
randomize;
unit4.z:=Strtoint(edit1.text);
1:;
if z=40 then
begin
unit4.str:=random(6) + random(6) +2;
unit4.dex:=random(6) + random(6) +2;
unit4.agi:=random(6) + random(6) +2;
unit4.con:=random(6) + random(6) +2;
unit4.int:=random(6) + random(6) +2;
unit4.acy:=random(6) + random(6) +2;
unit4.cha:=random(6) + random(6) +2;
unit4.wp:= random(6) + random(6) +2;
unit4.mf:= random(6) + random(6) +2;
unit4.s:=40;
end;

if z=7 then
begin
unit4.str:=2;
unit4.dex:=2;
unit4.agi:=2;
unit4.con:=2;
unit4.int:=2;
unit4.acy:=2;
unit4.cha:=2;
unit4.wp:=2;
unit4.mf:=2;
unit4.q:=45;
Label5.Caption:=inttostr(q);
unit4.s:=35;
end;

if z=8 then
begin
unit4.str:=2;
unit4.dex:=2;
unit4.agi:=2;
unit4.con:=2;
unit4.int:=2;
unit4.acy:=2;
unit4.cha:=2;
unit4.wp:=2;
unit4.mf:=2;
unit4.q:=54;
Label5.Caption:=inttostr(q);
unit4.s:=20;
end;

if z=20 then
begin

unit4.str:=0;
unit4.dex:=0;
unit4.agi:=0;
unit4.con:=0;
unit4.int:=0;
unit4.acy:=0;
unit4.cha:=0;
unit4.wp:=0;
unit4.mf:=0;

Label11.Caption:=inttostr(str);
Label12.Caption:=inttostr(dex);
Label13.Caption:=inttostr(agi);
Label14.Caption:=inttostr(con);
Label15.Caption:=inttostr(int);
Label16.Caption:=inttostr(acy);
Label17.Caption:=inttostr(cha);
Label18.Caption:=inttostr(wp);
Label19.Caption:=inttostr(mf);


 
Poirot ©   (2005-08-23 10:29) [6]

Дык, а где ошибка-то возникает?! Строк много и считать не очень-то хочется!!!
и ешшо - есть теги для кода - см в окошке кнопочку КОД


 
Плохиш ©   (2005-08-23 10:40) [7]

Ответ дан в [2]. Считай begin-end.


 
Serfy ©   (2005-08-23 10:46) [8]

4 часть:

unit4.a:=random(6)+1;
unit4.a1:=random(6)+1;
unit4.a2:=random(6)+1;
begin
if a>=a1  then
begin
if a1>=a2 then
unit4.a3:=a+a1
else
unit4.a3:=a+a2;
end
else
unit4.a3:=a1+a2;
end;
Label7.Caption:=inttostr(a3);

unit4.b:=random(6)+1;
unit4.b1:=random(6)+1;
unit4.b2:=random(6)+1;
begin
if b>=b1  then
begin
if b1>=b2 then
unit4.b3:=b+b1
else
unit4.b3:=b+b2;
end
else
unit4.b3:=b1+b2;
end;
Label8.Caption:=inttostr(b3);

unit4.c:=random(6)+1;
unit4.c1:=random(6)+1;
unit4.c2:=random(6)+1;
begin
if c>=c1  then
begin
if c1>=c2 then
unit4.c3:=c+c1
else
unit4.c3:=c+c2;
end
else
unit4.c3:=c1+c2;
end;
Label9.Caption:=inttostr(c3);

unit4.d:=random(6)+1;
unit4.d1:=random(6)+1;
unit4.d2:=random(6)+1;
begin
if d>=d1  then
begin
if d1>=d2 then
unit4.d3:=d+d1
else
unit4.d3:=a+d2;
end
else
unit4.d3:=d1+d2;
end;
Label20.Caption:=inttostr(d3);

unit4.e:=random(6)+1;
unit4.e1:=random(6)+1;
unit4.e2:=random(6)+1;
begin
if e>=e1  then
begin
if e1>=e2 then
unit4.e3:=e+e1
else
unit4.e3:=e+e2;
end
else
unit4.e3:=e1+e2;
end;
Label21.Caption:=inttostr(e3);

unit4.f:=random(6)+1;
unit4.f1:=random(6)+1;
unit4.f2:=random(6)+1;
begin
if f>=f1  then
begin
if f1>=f2 then
unit4.f3:=f+f1
else
unit4.f3:=f+f2;
end
else
unit4.f3:=f1+f2;
end;
Label22.Caption:=inttostr(f3);

unit4.g:=random(6)+1;
unit4.g1:=random(6)+1;
unit4.g2:=random(6)+1;
begin
if g>=g1  then
begin
if g1>=g2 then
unit4.g3:=g+g1
else
unit4.g3:=g+g2;
end
else
unit4.g3:=g1+g2;
end;
Label23.Caption:=inttostr(g3);

unit4.h:=random(6)+1;
unit4.h1:=random(6)+1;
unit4.h2:=random(6)+1;
begin
if h>=h1  then
begin
if h1>=h2 then
unit4.h3:=h+h1
else
unit4.h3:=h+h2;
end
else
unit4.h3:=h1+h2;
end;
Label24.Caption:=inttostr(h3);

unit4.i:=random(6)+1;
unit4.i1:=random(6)+1;
unit4.i2:=random(6)+1;
begin
if i>=i1  then
begin
if i1>=i2 then
unit4.i3:=i+i1


 
Serfy ©   (2005-08-23 11:10) [9]

все разобрался спасибо действительно не хватало енда


 
app ©   (2005-08-23 11:44) [10]

Serfy ©   (23.08.05 10:18) [3]
Больше так не делай, выкладывай только значимую часть кода, строка с ошибкой и несколько строе до и после.


 
Eraser ©   (2005-08-23 20:48) [11]

Serfy ©

В дополнении к [10], советую почитать http://www.delphikingdom.com/asp/viewitem.asp?catalogID=802
так же есть полезная утилита JCF по-моему...



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

Текущий архив: 2005.10.02;
Скачать: CL | DM;

Наверх




Память: 0.5 MB
Время: 0.067 c
1-1126014295
NikNet
2005-09-06 17:44
2005.10.02
Чем отличаются виртуальные и простые методы?


1-1126000453
Dennis S
2005-09-06 13:54
2005.10.02
Как читать из любого ЕХЕ файла данные...


1-1125996767
oradb
2005-09-06 12:52
2005.10.02
HotKey для TToolButton


8-1116106739
XAOC
2005-05-15 01:38
2005.10.02
Вопрос по WAVE файлу


14-1126170736
КаПиБаРа
2005-09-08 13:12
2005.10.02
Про звук телевизора из радио