Any Java Script experts (or competent people) here?

What's Hot
quarkyquarky Frets: 2777
I have having an issue and getting the following error:
error too many calls to session.enddialog()

Does that mean anything to anyone?

I can provide more info, but thought I would ask first..

0reaction image LOL 0reaction image Wow! 0reaction image Wisdom

Comments

  • monquixotemonquixote Frets: 17645
    tFB Trader
    You are going to need to provide a lot more context than that!
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • MayneheadMaynehead Frets: 1782
    edited June 2016
    Have you tried asking Google?


    0reaction image LOL 0reaction image Wow! 1reaction image Wisdom
  • quarkyquarky Frets: 2777
    I am looking at the MS Botbuilder framework, and trying to get a fairly simple bot to answer questions that has been passed through LUIS.AI.

    So here is my app.js, and the prompt file is here.

    The LUIS bit I am fine with, so if I ask LUIS "when did my gas contract start", it returns this, but app.js returns the session.enddialog() error.

    So I think the problem is being generated in the answerQuestion function, but not sure the best way to troubleshoot it..

    I guess I can start by returning something to the console to determine where I am (which function or where), but not quite sure how to do that in js.
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • quarkyquarky Frets: 2777
    edited June 2016
    Maynehead said:
    Have you tried asking Google?


    Holy shit that was a good guess.

    Yeah I looked at that, but not sure if that is my exact problem (he is not using prompts). To be fair, I know a little more now than I did when I first looked at that link a few days ago, but probably need to go through it again.
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • quarkyquarky Frets: 2777
    Still not getting very far. I guess the problem code is botbuilder specific though rather than JS.

    How can I put a simple message back in JS though so at least I know exactly where the error is being generated? Something like printf in C or write-host in Powershell?
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • roundthebendroundthebend Frets: 1137
    quarky said:
    Still not getting very far. I guess the problem code is botbuilder specific though rather than JS.

    How can I put a simple message back in JS though so at least I know exactly where the error is being generated? Something like printf in C or write-host in Powershell?
    console.log
    0reaction image LOL 0reaction image Wow! 1reaction image Wisdom
  • MayneheadMaynehead Frets: 1782
    quarky said:
    Still not getting very far. I guess the problem code is botbuilder specific though rather than JS.

    How can I put a simple message back in JS though so at least I know exactly where the error is being generated? Something like printf in C or write-host in Powershell?
    You can stick some alert("some text") calls in various parts of the code to do some quick debugging.
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • PolarityManPolarityMan Frets: 7294
    The browsers all provide js debugging these days btw
    ဈǝᴉʇsɐoʇǝsǝǝɥɔဪቌ
    0reaction image LOL 0reaction image Wow! 1reaction image Wisdom
  • quarkyquarky Frets: 2777
    Thanks for the responses.

    What is a good free (and lightweight if possible) editor/ISE to use for Java Script?
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • MayneheadMaynehead Frets: 1782
    There is always Eclipse of course, but for simple editing the easiest way is to use Chrome developer tools. Just press F12 whilst in Chrome to launch it. Great for debugging any JS code that's running in the browser, and you can even change the code and see the changes reflected on the page in real time.
    0reaction image LOL 0reaction image Wow! 1reaction image Wisdom
  • quarkyquarky Frets: 2777
    Thanks!
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • monquixotemonquixote Frets: 17645
    edited June 2016 tFB Trader
    Use visual studio code
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
Sign In or Register to comment.