• Ranking System using SecLVLs

    From CatX@21:1/112 to All on Saturday, October 27, 2018 14:04:42
    (For history, see posts 2935, 2936 and 2979)Essenti
    ally what I'm trying to do is creating a ranking system where users
    gain a higher rank when completing certain criteria such as being a member o fthe server for a certain amount of time, etc.
    I'm trying to do this using a MPL script and records.112, but there's a
    slight error at hand; no matter what I do I just can't get the damned thing
    to compile.The compiler keeps screaming at this part: -----TypeUserPasswordRecord = Array[1..101] of Byte
    ; RecUser = RecordPermIdx:
    LongInt;Flags: LongInt;Password: Use
    rPasswordRecord;{ more records here}
    End;-----For some reason it accepts only records as typ
    es, preventing me from usingUserPasswordRecord.
    I've looked at how the other scripts were made and they all followed this
    rule except for records.112, from which I pasted the above part.
    Does anyone know why this happens?PS. I'm aware that UserPass
    wordRecord most likely wont be used in thisparticular script
    , but I want to know *why* this happens, as I might needUser
    PasswordRecord in another script of mine, and then I want to be able
    to useit.
    |10 ¿ÚÂÄ ³
    |10 ÃÁ´. ³ CatX
    |10 Ù ÀÙ ³

    --- Mystic BBS v1.12 A39 2018/04/21 (Windows/32)
    * Origin: Black Flag <ACiD Telnet HQ> blackflagbbs.com (21:1/112)
  • From Gryphon@21:1/120 to CatX on Saturday, October 27, 2018 14:21:32
    On 10/27/18, CatX said the following...

    (For history, see posts 2935, 2936 and 2979)

    Essentially what I'm trying to do is creating a ranking system where users gain a higher rank when completing certain criteria such as being a member the server for a certain amount of time, etc.

    I'm trying to do this using a MPL script and records.112, but there's a slight error at hand; no matter what I do I just can't get the damned thin to compile.

    The compiler keeps screaming at this part:

    -----
    Type
    UserPasswordRecord = Array[1..101] of Byte;

    RecUser = Record
    PermIdx :LongInt;
    Flags : LongInt;
    Password : UserPasswordRecord;

    { more records here}

    End;
    -----
    For some reason it accepts only records as types, preventing me from using UserPasswordRecord.
    I've looked at how the other scripts were made and they all followed this rule except for records.112, from which I pasted the above part.

    Does anyone know why this happens?

    PS. I'm aware that UserPasswordRecord most likely wont be used in this particular script, but I want to know *why* this happens, as I might need UserPasswordRecord in another script of mine, and then I want to be able t it.

    You have to remember that MPL is NOT Pascal. It is only Pascal-like. Not
    all features of Pascal are included in MPL.

    If you're trying to get some user info that doesn't have a specific variable
    in MPL, you can easily get it by using the 'MCI2STR()' command. Check out
    the user and BBS display codes that you can use at: http://wiki.mysticbbs.com/doku.php?id=displaycodes.

    For instance, if you want to capture the user's Post/Call ratio it would be:

    PCRatio := MCI2STR('PC')

    It always returns a string, so you'll have to convert it with Str2Int() if its for an INT value.

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (21:1/120)