Subj : JS Commission?
To   : echicken
From : Android8675
Date : Mon Jul 20 2020 01:21 pm

 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