• Replaceable Peram

    From DesotoFireflite@VERT/VALHALLA to All on Friday, October 23, 2015 15:16:03
    How do you go about using the @ replaceable perameters in a js file. I tried to add time left to the chat module, and all it did was print TIMELEFT instead of putting the actual time left. Can it be done as part of the prompt, or am I trying to invent the wheel again. As always, Thanks.

    C.G. Learn
    Valhalla Home Services! - Telnet://valhalla.synchro.net
    A Gamers Paradise - Over 100 Registered Online Game Doors!

    --- CAT (n.), Furry keyboard cover.
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From echicken@VERT/ECBBS to DesotoFireflite on Friday, October 23, 2015 16:29:20
    Re: Replaceable Peram
    By: DesotoFireflite to All on Fri Oct 23 2015 15:16:03

    How do you go about using the @ replaceable perameters in a js file. I tried to add time left to the chat module, and all it did was print TIMELEFT instead of putting the actual time left. Can it be done as part of the prompt, or am I trying to invent the wheel again. As always,

    They should work when outputted through console.putmsg, eg:

    console.putmsg("Time left: @TIMELEFT@");

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From echicken@VERT/ECBBS to DesotoFireflite on Friday, October 23, 2015 16:30:19
    Re: Replaceable Peram
    By: echicken to DesotoFireflite on Fri Oct 23 2015 16:29:20

    They should work when outputted through console.putmsg, eg: console.putmsg("Time left: @TIMELEFT@");

    Heh, of course that won't really show up the way I intended, but you get the idea.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Nightfox@VERT/DIGDIST to DesotoFireflite on Friday, October 23, 2015 13:18:55
    How do you go about using the @ replaceable perameters in a js file. I
    tried
    to add time left to the chat module, and all it did was print TIMELEFT instead of putting the actual time left. Can it be done as part of the prompt, or am I trying to invent the wheel again. As always, Thanks.

    The console.putmsg() function should do what you want. console.putmsg() will interpret @-codes, etc. as it displays the text you give it. For parameters, it takes a text string and an optional mode bits parameter.

    http://www.synchro.net/docs/jsobjs.html#console

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From DesotoFireflite@VERT/VALHALLA to echicken on Friday, October 23, 2015 17:19:40
    Re: Replaceable Peram
    By: echicken to DesotoFireflite on Fri Oct 23 2015 04:29 pm

    They should work when outputted through console.putmsg, eg:

    console.putmsg("Time left: @TIMELEFT@");

    Ok, I'll try that, Thanks EC.

    C.G. Learn
    Valhalla Home Services! - Telnet://valhalla.synchro.net
    A Gamers Paradise - Over 100 Registered Online Game Doors!

    --- SENILE.COM found...Out of Memory...
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From DesotoFireflite@VERT/VALHALLA to Nightfox on Friday, October 23, 2015 17:24:56
    Re: Replaceable Peram
    By: Nightfox to DesotoFireflite on Fri Oct 23 2015 01:18 pm

    The console.putmsg() function should do what you want. console.putmsg() will interpret @-codes, etc. as it displays the text you give it. For parameters, it takes a text string and an optional mode bits parameter.

    http://www.synchro.net/docs/jsobjs.html#console

    I scanned that, but I didn't see it, but to be fair, I was looking for more of a print command like baja. Ok, thanks.

    C.G. Learn
    Valhalla Home Services! - Telnet://valhalla.synchro.net
    A Gamers Paradise - Over 100 Registered Online Game Doors!

    --- Old farts never die! They just smell that way...
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net