• JS error

    From Merlin@VERT/CARSO to All on Wed Dec 20 14:47:00 2006
    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@VERT/ELDRITCH to Merlin on Wed Dec 20 13:36:00 2006
    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@VERT/SYNCNIX to Merlin on Wed Dec 20 17:50:00 2006
    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@VERT/ELDRITCH to Deuce on Wed Dec 20 21:54:00 2006
    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@VERT/CARSO to Deuce on Thu Dec 21 17:22:00 2006
    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@VERT/SYNCNIX to Merlin on Thu Dec 21 12:43:00 2006
    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@VERT/SYNCNIX to Merlin on Thu Dec 21 15:34:00 2006
    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@VERT/CARSO to Deuce on Thu Dec 21 22:07:00 2006
    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