• Error compiling this source in Pascal

    From Rodrigo Cesar Banhara@4:801/188 to All on Sun Sep 4 22:37:38 2016
    How to overcome this error on Lazarus?

    This is the error generated by Lazarus:
    Compile Project, Target: C:\Users\APOMET~1\AppData\Local\Temp\nsg7EC2.tmp\ContainedTemp\project1.exe: Exit code 1, Errors: 1
    unit.pas(27,0) Error: Can't open resource file "C:\Users\APOMET~1\AppData\Local\Temp\nsg7EC2.tmp\ContainedTemp\unit1.lfm

    And this is the source I used:

    procedure oneliners;

    var Twriters : array[1..10] of string;
    var Toneliner : array[1..10] of string;
    var S : string;
    var Foneline : string;
    var Ch1 : char;
    var Ch2 : char;
    var Ch3 : char;
    var Count : byte;

    Begin
    printf('oneh.ans');
    For Count := 1 To 10 Do Begin;
    write('^[[1;37m+ ^[[0;37m');
    write(Twriters[Count]);
    write('^[[1;30m: ^[[0;37m');
    WriteLn(Toneliner[Count]);
    End;
    End; // show

    Procedure init;

    Var f1 : textfile;
    var Count : byte;

    Begin
    fOneLine := ('F:\BBS\mmwin050\TAGLINES');
    If Not fileExists(fOneLine) Then Begin
    Assign(f1, fOneLine);
    ReWrite(f1);
    For Count := 1 To 10 Do Begin
    WriteLn(f1,'Ia! Cthulhu!');
    WriteLn(f1,'IGNATIUS');
    End;
    Close(f1);
    End;

    Assign(f1, fOneLine);
    Reset(f1);
    If IoResult = 0 Then Begin
    For Count := 1 To 10 Do Begin
    ReadLn(f1, Toneliner[Count]);
    ReadLn(f1, Twriters[Count]);
    End;
    Close(f1);
    End;
    End; // Init

    Procedure bot_bar;
    Begin
    printf('onen.ans');
    Ch2 := ReadKey;
    If Ch2 = #13 then Begin
    exit;
    End;
    show;
    End; // bot_bar


    Procedure top_bar;

    Var f1 : textfile;
    var Count : byte;
    var ch3 : char;


    Begin
    printf('oney.ans');
    Ch3 := ReadKey;
    If Ch3 = #13 then Begin
    printf('oneline.asc');
    Write('^[[3;3H');
    inputl(s,70);
    If s = '' then Begin
    WriteLn('^[[1;30maborted^[[0;37m');
    show;
    Exit;
    End;
    For Count := 1 To 9 Do Begin
    Count2 := Count + 1;
    Toneliner[Count] := Toneliner[Count2];
    Twriters[Count] := Twriters[Count2];
    End;

    tWriters[10]:=thisuser.name;
    tOneTo 10 do Begin
    WriteLn(f1,tOneliner[Count]);
    WriteLn(f1,tWriters[Count]);
    End;
    Close(f1);
    End;
    show;
    End; // top_bar

    Procedure position;

    Begin
    show;
    Repeat
    printf('onen.ans');
    ch1:=ReadKey;
    case ch1 of
    #0 : begin
    ch1:=ReadKey;
    case ch1 of
    #80 : bot_bar;
    #72 : top_bar;
    #75 : top_bar;
    #77 : bot_bar;
    end;
    end;
    end;
    until ch1=#13
    end;


    Begin
    init;
    Position;
    End;

    ... Amnesia and Deja-Vu: You forgot this happened before.
    ___ MultiMail/Win32 v0.50

    --- Mystic BBS/QWK v1.12 A31 (Windows)
    * Origin: Saturn's Orbit BBS * Running Mystic * Brazil (4:801/188)
  • From Rodrigo Cesar Banhara@4:801/188 to All on Sun Sep 4 22:41:16 2016
    How to overcome this error on Lazarus?

    This is the error generated by Lazarus:
    Compile Project, Target: C:\Users\APOMET~1\AppData\Local\Temp\nsg7EC2.tmp\ContainedTemp\project1.exe: Exit code 1, Errors: 1
    unit.pas(27,0) Error: Can't open resource file "C:\Users\APOMET~1\AppData\Local\Temp\nsg7EC2.tmp\ContainedTemp\unit1.lfm

    And this is the source I used:

    procedure oneliners;

    var Twriters : array[1..10] of string;
    var Toneliner : array[1..10] of string;
    var S : string;
    var Foneline : string;
    var Ch1 : char;
    var Ch2 : char;
    var Ch3 : char;
    var Count : byte;

    Begin
    printf('oneh.ans');
    For Count := 1 To 10 Do Begin;
    write('^[[1;37m+ ^[[0;37m');
    write(Twriters[Count]);
    write('^[[1;30m: ^[[0;37m');
    WriteLn(Toneliner[Count]);
    End;
    End; // show

    Procedure init;

    Var f1 : textfile;
    var Count : byte;

    Begin
    fOneLine := ('F:\BBS\mmwin050\TAGLINES');
    If Not fileExists(fOneLine) Then Begin
    Assign(f1, fOneLine);
    ReWrite(f1);
    For Count := 1 To 10 Do Begin
    WriteLn(f1,'Ia! Cthulhu!');
    WriteLn(f1,'IGNATIUS');
    End;
    Close(f1);
    End;

    Assign(f1, fOneLine);
    Reset(f1);
    If IoResult = 0 Then Begin
    For Count := 1 To 10 Do Begin
    ReadLn(f1, Toneliner[Count]);
    ReadLn(f1, Twriters[Count]);
    End;
    Close(f1);
    End;
    End; // Init

    Procedure bot_bar;
    Begin
    printf('onen.ans');
    Ch2 := ReadKey;
    If Ch2 = #13 then Begin
    exit;
    End;
    show;
    End; // bot_bar


    Procedure top_bar;

    Var f1 : textfile;
    var Count : byte;
    var ch3 : char;


    Begin
    printf('oney.ans');
    Ch3 := ReadKey;
    If Ch3 = #13 then Begin
    printf('oneline.asc');
    Write('^[[3;3H');
    inputl(s,70);
    If s = '' then Begin
    WriteLn('^[[1;30maborted^[[0;37m');
    show;
    Exit;
    End;
    For Count := 1 To 9 Do Begin
    Count2 := Count + 1;
    Toneliner[Count] := Toneliner[Count2];
    Twriters[Count] := Twriters[Count2];
    End;

    tWriters[10]:=thisuser.name;
    tOneTo 10 do Begin
    WriteLn(f1,tOneliner[Count]);
    WriteLn(f1,tWriters[Count]);
    End;
    Close(f1);
    End;
    show;
    End; // top_bar

    Procedure position;

    Begin
    show;
    Repeat
    printf('onen.ans');
    ch1:=ReadKey;
    case ch1 of
    #0 : begin
    ch1:=ReadKey;
    case ch1 of
    #80 : bot_bar;
    #72 : top_bar;
    #75 : top_bar;
    #77 : bot_bar;
    end;
    end;
    end;
    until ch1=#13
    end;


    Begin
    init;
    Position;
    End;

    ... Amnesia and Deja-Vu: You forgot this happened before.
    ___ MultiMail/Win32 v0.50

    --- Mystic BBS/QWK v1.12 A31 (Windows)
    * Origin: Saturn's Orbit BBS * Running Mystic * Brazil (4:801/188)
  • From Tony Master@1:218/530 to Rodrigo Cesar Banhara on Sun Sep 4 20:24:31 2016
    On 09/04/16, Rodrigo Cesar Banhara said the following...
    How to overcome this error on Lazarus?
    This is the error generated by Lazarus:
    And this is the source I used:
    procedure oneliners;
    var Twriters : array[1..10] of string;
    var Toneliner : array[1..10] of string;
    var S : string;

    you forget to add units to the source?

    |08 .|05�|13�|15Dr|07e|08am Ma|07st|15er|13�|05�|08.
    |08 ��|05�|13�� |13��|05�|08��
    |11 DoRE|03!|11ACiDiC|03!|11Demonic |08[|15dreamland|09.|15darktech|09.|15org|08]

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: --[!dreamland BBS dreamland.darktech.org (1:218/530)
  • From Rodrigo Cesar Banhara@4:801/188 to Tony Master on Tue Sep 6 21:12:56 2016
    Tony Master wrote to Apometron <=-

    On 09/04/16, Rodrigo Cesar Banhara said the following...
    How to overcome this error on Lazarus?
    This is the error generated by Lazarus:
    And this is the source I used:
    procedure oneliners;
    var Twriters : array[1..10] of string;
    var Toneliner : array[1..10] of string;
    var S : string;

    you forget to add units to the source?

    Thanks by the reply, but I dont understand /why/ I do
    need add the clause Uses or add units to the source. =(

    []s
    Rodrigo Cesar
    aka Apometron

    ... "640K ought to be enough for anybody." - Bill Gates, 1981
    ___ MultiMail/Win32 v0.50

    --- Mystic BBS/QWK v1.12 A31 (Windows)
    * Origin: Saturn's Orbit BBS * Running Mystic * Brazil (4:801/188)