CocoonJS error

  • Hi

    Due to the nature of my app, I cannot provide a capx file.

    But here is the error I receive:

    JSUtlities Exception: ReferenceError: Can't find variable: sessionStorage Cause: Tag: requestAnimationFrame Function: function() {b.Ec();}

    This is from a page where I tell it to automatically navigate to a new layout after x seconds using the following method:

    System - Trigger Once:

    -> Wait 3 seconds

    -> Go to layout "Home"

    On the next layout I do use the WebStorage object to check if a key exists in Session Storage first, and then its value.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Does removing the WebStorage object fix it? I believe CocoonJS only implements local storage, not session storage. Why do you need session storage anyway? It should have the same life span as a global variable. I'm considering deprecating session storage for that reason.

  • It might do. Will try it tomorrow (it's 7pm here, work is done for the day).

    What would you say is a "maximum" global variable count? I just don't want to get to a situation where I start using too many....

    I am using the session storage for certain tags and also conditions per level. If I can use variables for that then I will move over to it.

    Thanks Ash.

  • You can use an unlimited number of global variables, and it will probably not have any measurable effect on memory and performance.

  • Hi,

    don't know if this is the correct place to write this o should i open a new thread, but anyway, the title of this treath is the same as my problem, so i will post it here, correct me if wrong.

    Can not post the .capx because is for commercial purpose.

    But i'm getting this error:

    JSUtilities Exception: TypeError: Result of expression 'a.canvas' [undefined] is not an object. Cause: Tag: timer Function: function () {a.go();}

    Can't figure out what it's.

    Thanks in advance....

  • Behamut, please don't cross post - see my other post about posting a bug report.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)