• JS Commission?

    From Android8675@VERT/SHODAN to echicken on Monday, July 20, 2020 13:21:55
    Re: JS Commission?
    By: echicken to Android8675 on Wed Jul 15 2020 10:43 pm

    Re: JS Commission?
    By: Android8675 to echicken on Wed Jul 15 2020 09:40:17

    I would probably do this:

    const fg = ['green', 'white', 'white', 'yellow'];
    const bg = ['black', 'black', 'blue', 'black'];
    const colors = console.getnum(4, 1) - 1;

    bbs.exec(
    'frotz '
    ...
    + '-f ' + fg[colors]
    + '-b ' + bg[colors]
    ...
    );

    Where 'fg' and 'bg' are arrays of strings. If the user hits '4', fg[3] and bg[3] would be used, so the user would get yellow-on-black, and so on. (If I'm understanding your goal properly.)

    Yeah, that looks right, and verified that the results I need are getting passed to bbs.exec, but I think frotz doesn't like something. It's throwing up TERMCAP errors. I had to catch the output in a janky way, but it threw up:

    ERROR: Unknown terminal: ansi-bbs
    Check the TERM environment variable.
    Also make s
    ure that the terminal is defined in the terminfo database.
    Alternatively, set the
    TERMCAP environment variable to the desired
    termcap entry
    --clip--

    Tried with both frotz and dfrotz, same error.

    console.putmsg(" 3.\1h\14 White on Blue\1n");

    Not sure. Try \x014 instead of \14 and see if it helps.

    That did it. Thanks.
    -A.

    --
    Android8675@ShodansCore

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From echicken@VERT/ECBBS to Android8675 on Monday, July 20, 2020 22:27:21
    Re: JS Commission?
    By: Android8675 to echicken on Mon Jul 20 2020 13:21:55

    ERROR: Unknown terminal: ansi-bbs
    Check the TERM environment variable.
    Also make s
    ure that the terminal is defined in the terminfo database.
    Alternatively, set the
    TERMCAP environment variable to the desired
    termcap entry

    Try following the "Terminal Capabilities" section here:

    http://wiki.synchro.net/install:nix#terminal_capabilities

    There are probably other hacky ways around this, but with any luck that'll get the job done.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com