• JS error

    From Merlin@CARSO to All on Wednesday, December 20, 2006 14:47:00
    Hi all.

    I have a script that is causing the BBs to crash (freebsd version) when it runs and I have tried a few things to get it working but can't. Can anyoe
    see what is wrong with this?


    top =format(bbs.text(377),"",user.age,user.gender,user.birthdate
    ,user.name,user.phone,user.computer,user.connection);

    bbs.email(bbs.node_val_user,null
    ,top
    ,"New user introduction");

    What it should do is read prompt 377 from text.dat (which it does) and
    format it with the users data and place it in a sting called top
    Then it creates a new email to the sysop with that text at the top of the message. Basically, it is a JS version of the new user feedback email
    that I run from a script.

    If I take out all of the user. variables so it says

    top =format(bbs.text(377),"");

    then it works, in so far as it creates an email and puts string 377 at the
    top of the text. Any ideas why it doesn't work when I try to populate the string 377 with the users data would be appreciated!

    Thanks
    Merlin


    --------------------------------------------------------------
    Merlin ■ SysOp of CarSo BBs ■ telnet://carso.synchro.net --------------------------------------------------------------


    ---
    ■ Synchronet ■ CarSo BBs ■ Beverley, UK ■ telnet://carso.synchro.net
  • From Mindless Automaton@ELDRITCH to Merlin on Wednesday, December 20, 2006 13:36:00
    Merlin wrote:
    Hi all.

    I have a script that is causing the BBs to crash (freebsd version) when it runs and I have tried a few things to get it working but can't. Can anyoe see what is wrong with this?


    top =format(bbs.text(377),"",user.age,user.gender,user.birthdate
    ,user.name,user.phone,user.computer,user.connection);

    bbs.email(bbs.node_val_user,null
    ,top
    ,"New user introduction");


    I will guess and say fields with null values cause it to crash? :)

    -Mindless Automaton
    ---
    ■ Synchronet ■ Eldritch Clockwork BBS
  • From Deuce@SYNCNIX to Merlin on Wednesday, December 20, 2006 17:50:00
    Re: JS error
    By: Merlin to All on Wed Dec 20 2006 02:47 pm

    top =format(bbs.text(377),"",user.age,user.gender,user.birthdate
    ,user.name,user.phone,user.computer,user.connection);
    top of the text. Any ideas why it doesn't work when I try to populate the string 377 with the users data would be appreciated!

    Yeah, you need to pass a string for strings and a number for numbers in the last release version.

    ie: String, num, num, string, string, string, string, string

    you're passing:
    string, num, string, string, string, string, string, string

    Try changing user.gender to ascii(user.gender)

    This has been fixed for 3.14


    ---
    The buck doesn't even slow down here.

    ---
    ■ Synchronet ■ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Mindless Automaton@ELDRITCH to Deuce on Wednesday, December 20, 2006 21:54:00
    Deuce wrote:
    Re: JS error
    By: Merlin to All on Wed Dec 20 2006 02:47 pm

    top =format(bbs.text(377),"",user.age,user.gender,user.birthdate
    ,user.name,user.phone,user.computer,user.connection);
    top of the text. Any ideas why it doesn't work when I try to populate the string 377 with the users data would be appreciated!

    Yeah, you need to pass a string for strings and a number for numbers in the last release version.

    ie: String, num, num, string, string, string, string, string

    you're passing:
    string, num, string, string, string, string, string, string

    Try changing user.gender to ascii(user.gender)

    This has been fixed for 3.14

    rat.. my guess was no where near close.. oh well..

    - Mindless Automaton
    ---
    ■ Synchronet ■ Eldritch Clockwork BBS
  • From Merlin@CARSO to Deuce on Thursday, December 21, 2006 17:22:00
    Re: JS error
    By: Deuce to Merlin on Wed Dec 20 2006 17:50:00

    you're passing:
    string, num, string, string, string, string, string, string

    Try changing user.gender to ascii(user.gender)

    This has been fixed for 3.14

    Hi. Thanks. I'll give that a try in a minute, although I am using 3.14 on FreeBSD!

    R

    --------------------------------------------------------------
    Merlin ■ SysOp of CarSo BBs ■ telnet://carso.synchro.net --------------------------------------------------------------


    ---
    ■ Synchronet ■ CarSo BBs ■ Beverley, UK ■ telnet://carso.synchro.net
  • From Deuce@SYNCNIX to Merlin on Thursday, December 21, 2006 12:43:00
    Re: JS error
    By: Merlin to Deuce on Thu Dec 21 2006 05:22 pm

    you're passing:
    string, num, string, string, string, string, string, string

    Try changing user.gender to ascii(user.gender)

    This has been fixed for 3.14

    Hi. Thanks. I'll give that a try in a minute, although I am using 3.14 on FreeBSD!

    In which case we have a different issue... try adding the params one at a time until it causes the crash... I'll try reproducing on my system.


    ---
    The buck doesn't even slow down here.

    ---
    ■ Synchronet ■ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Deuce@SYNCNIX to Merlin on Thursday, December 21, 2006 15:34:00
    Re: JS error
    By: Deuce to Merlin on Thu Dec 21 2006 12:43 pm

    Hi. Thanks. I'll give that a try in a minute, although I am using 3.14
    on FreeBSD!

    In which case we have a different issue... try adding the params one at a time until it causes the crash... I'll try reproducing on my system.

    Ok, problem reproduced and solved two ways in CVS.

    My suggestion should still make it work however. :-)

    ---
    The buck doesn't even slow down here.

    ---
    ■ Synchronet ■ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Merlin@CARSO to Deuce on Thursday, December 21, 2006 22:07:00
    Re: JS error
    By: Deuce to Merlin on Thu Dec 21 2006 12:43:00

    Re: JS error
    By: Merlin to Deuce on Thu Dec 21 2006 05:22 pm

    This has been fixed for 3.14

    In which case we have a different issue... try adding the params one at a ti until it causes the crash... I'll try reproducing on my system.

    Ive changed my script to use ascii(user.gender) and it now works. I am
    using the latest CVS of 3.14 for FreeBSD, so maybe it isn't fixed!

    Merlin

    --------------------------------------------------------------
    Merlin ■ SysOp of CarSo BBs ■ telnet://carso.synchro.net --------------------------------------------------------------


    ---
    ■ Synchronet ■ CarSo BBs ■ Beverley, UK ■ telnet://carso.synchro.net