• MPL Issue

    From Black Panther@21:1/186 to All on Monday, March 29, 2021 14:48:46
    Hi All,

    I've been working on an MPL for Mystic, that is giving me a bit of an issue. I'm not sure if it might be an 'undocumented feature of Mystic's MPL system, or a coding issue on my end...

    In this code, I am using a Record, which contains an array of records. Everything is compiling just fine, and it seems to be working to a point...

    The array of records contained in the main record, contains an array of string[80]. When I try to write those lines of text to the screen, I can only get the first 5 characters of the 1st element of the array...

    Here's the records:

    Type BBSRevs = Record
    RevTxt : Array[1..4] of String[80]
    RevRate : Byte
    End

    Type BBSRec = Record
    Telnet : String[40]
    Name : String[40]
    City : String[25]
    Sysop : String[30]
    Nodes : String[6]
    Soft : String[11]
    Deleted : Boolean
    AddedBy : String[30]
    Port : String[10]
    SSH : String[10]
    RLogin : String[10]
    Stars : Byte
    Reviews : Byte
    BBSRev : Array[1..20] Of BBSRevs
    End

    Var
    Entry : BBSRec


    So, when I try to write:

    WriteLn(PadRt(Entry.BBSRev[1].RevTxt[1],MaxX-X,' '))

    I am only getting the first 5 characters. If I try the other 3 strings, they print just fine.

    Has anyone else run into something like this? I don't think there is any issues with the code, but anythings possible...

    Thanks in advance. I've been pulling what's left of my hair out of my head trying to figure this one out. ;)


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A47 2021/01/14 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (21:1/186)
  • From fusion@21:1/616 to Black Panther on Monday, March 29, 2021 17:24:08
    On 29 Mar 2021, Black Panther said the following...

    WriteLn(PadRt(Entry.BBSRev[1].RevTxt[1],MaxX-X,' '))

    I am only getting the first 5 characters. If I try the other 3 strings, they print just fine.

    how are these strings being read in / assigned? and does writeln() without
    the padrt() function write out the complete data?

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: cold fusion - cfbbs.net - grand rapids, mi (21:1/616)
  • From Black Panther@21:1/186 to fusion on Monday, March 29, 2021 15:58:22
    On 29 Mar 2021, 05:24p, fusion said the following...

    how are these strings being read in / assigned? and does writeln() withoutthe padrt() function write out the complete data?

    It's being read with the following function:

    Function ReadEntry(I:Integer):Boolean
    Var
    Ret : Boolean = False
    Fp : File
    Begin
    fAssign(Fp,ListName,66)
    fReset(Fp)
    If IoResult = 0 Then
    Begin
    fSeek(Fp,(I-1)*SizeOf(Entry))
    If Not fEof(Fp) Then
    Begin
    fRead(Fp,Entry,SizeOf(Entry))
    Ret:=True
    End
    fClose(Fp)
    End
    ReadEntry:=Ret
    End

    It's writing the same whether the padrt() is there or not...

    There's nothing that I'm finding that would limit the string to 5 characters.

    Thanks for taking a look at this.


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A47 2021/01/14 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (21:1/186)
  • From Black Panther@21:1/186 to fusion on Monday, March 29, 2021 15:59:44
    On 29 Mar 2021, 05:24p, fusion said the following...

    how are these strings being read in / assigned? and does writeln() withoutthe padrt() function write out the complete data?

    Also, I did check the data file they are saved in, and I'm seeing the entire string being saved. So, it's something either with reading the data from the file, or when it's trying to write it...


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A47 2021/01/14 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (21:1/186)