• MPS Else Issue

    From Nugax@21:1/107 to g00r00 on Sunday, January 07, 2018 08:36:20
    g00r00 or anyone,

    Here is my code. I can't for the life of me figure out why a simple nested if/else wont work in Pascal (mpl)



    Begin
    writeln('|07Connected to |15The Byte|14X|15change BBS |07- Node |ND'); writeln('|07Press |11[ESC]|07 twice to enter BBS...');
    If ReadKey = #27 Then
    If ReadKey = #27 Then
    writeln('Booting BBS...'); delay(3*1000);
    Else Then
    menucmd('GI','');
    Else Then
    menucmd('GI','');

    End;



    -Nugax

    --- Mystic BBS v1.12 A38 2018/01/01 (Linux/64)
    * Origin: -=The ByteXchange BBS : bbs.thebytexchange.com=- (21:1/107)
  • From Nugax@21:1/107 to g00r00 on Sunday, January 07, 2018 08:39:15
    I get the exact same error when compiling if I take out "Then" from Else line



    ERRORS:
    Error in startup.mps (Line 7, Col 8): Unknown identifier: else
    Results: 1 files, 1 errors, 1 directories, 0.00 seconds cadams@byte-bbs:~/mystic/scripts$



    Code with no then:


    Begin
    writeln('|07Connected to |15The Byte|14X|15change BBS |07- Node |ND'); writeln('|07Press |11[ESC]|07 twice to enter BBS...');
    If ReadKey = #27 Then
    If ReadKey = #27 Then
    writeln('Booting BBS...'); delay(3*1000);
    Else
    menucmd('GI','');
    Else
    menucmd('GI','');

    End;



    -Nugax

    --- Mystic BBS v1.12 A38 2018/01/01 (Linux/64)
    * Origin: -=The ByteXchange BBS : bbs.thebytexchange.com=- (21:1/107)
  • From g00r00@21:1/108 to Nugax on Monday, January 08, 2018 14:41:11
    If ReadKey = #27 Then
    If ReadKey = #27 Then
    writeln('Booting BBS...'); delay(3*1000);
    Else Then

    There is no "Then" in an Else statement

    --- Mystic BBS v1.12 A39 2018/01/08 (Windows/32)
    * Origin: Sector 7 [Mystic BBS WHQ] (21:1/108)