(Resolved) Error with this.now function

I was trying to implement a “wait” function in Deadly Dungeon Rescue, however I am getting the error:
"Line 8: tmp180[tmp181] is not a function"

I’m wondering if this is a bug or something I’m missing.

Is your call to “wait(time)” nested in other function calls? If so try straight out calling it or calling it from your main loop to see if that makes a difference. (calling functions that call functions that call functions that… can get messed up along the way.)

Other than that I’d suggest reloading the level (and/or closing the browser). (I find that reloading when it starts to seem slower & slower or it starts getting weird errors, beats both things back.)

Useful reading :


Also, another way to do, as shown in the campain (later in the mountain) is to modify the this library (? unsure of the name) by adding a new function to it. It’s useful because any function from this is available within the function you’re defining.

this.functionName = function(_param1 , _param2 ) {
    // body
    this.say( _param1 +_param2 ) ;

this.functionName(2,3) ;
1 Like

I was actually thinking that might be the problem later that day. Thank you very much. That resolves this particular issue.

It’s resolved now, but thanks for the help!