Pozwolę sobie odkopać topik ;]
Czy znalazłby się jakiś "fachman od Delphi" i mógłby mnie oświecić czemu nie mogę skompilować tego wynalazku. Dodam, że jestem newbie co pewnie od razu widać.
Kod:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TForm1 = class(TForm)
ps2boot: TCheckBox;
cdrom: TComboBoxEx;
ps2save: TButton;
procedure ps2saveClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
cnf: textfile;
implementation
{$R *.dfm}
begin
procedure TForm1.ps2saveClick(Sender: TObject);
begin
if ps2boot.checked then
begin
assignfile(cnf, '.\SYSTEM.TXT');
try
rewrite(cnf);
write('BOOT2 = '); writeln('wstawic cdroma');
finally
closefile(cnf);
end;
Application.MessageBox('Plik został pomyślnie zapisany','SYSTEM.CNF',0);
end;
end.
Głupio mi, że wysypuję się na takich banałach, ale nie mogę zrozumieć co zrobiłem źle.
errory:
Kod:
[Error] Unit1.pas(31): Statement expected but 'PROCEDURE' found
[Error] Unit1.pas(44): ';' expected but '.' found
[Error] Unit1.pas(46): Declaration expected but end of file found
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'