Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by SlotGamer

When loading the game I sometimes get this error "SCRIPT445: Object doesn't support this action ". It outlines the entire extend() function. I've looked long and hard and cannot find anything wrong with it. This can happen on different classes, but for the most part it happens on 2 or 3 specifically each time.

Here is the strange part, it works if I press "refresh" ctrl-F5 multiple times. It eventually loads correctly. So that has been my workaround for now. So, it really seems maybe my issue is with the asynchronous loading being different each time and maybe something isn't defined/initialized yet on the times that it doesn't work.

The debugger shows valid values for the variables when this happens too.

Any clue how to go about figuring this out further?

1 decade ago by drhayes

What web browser are you using? If you're using Chrome, you can check the network tab of the developer tools (look for "JavaScript Console" under Tools or hit CTRL/CMD+SHIFT+J). You'll be able to confirm if something isn't getting loaded properly.

Are you using Apache?

1 decade ago by SlotGamer

I looked under the network tab but it doesn't show anything not loading correctly.

Yes I am using apache.

I got this to happen way less often now in Chrome by using JSHint and fixing a lot of warnings. Maybe just rearranging the code helped somehow. Now it happens rarely in chrome (1 out of 50 refreshes). But in IE9 it still happens all the time.

Googling "SCRIPT445: Object doesn't support this action" shows this can happen in IE9 when a variable is already reserved or in the DOM. But inspecting my variables doesn't lead to any obvious reserved vars.

In IE9 it happens 100% of the time when I press ctrl-F5 after it loads the first time.

1 decade ago by SlotGamer

I've now made this issue "go away" but I really would like to know why this fixes it.

In all of the offending files, I moved the initialization of variables from here:

mytest = ig.Class.extend() {
var1 : 0,
var2 : 1,

to the init function like this:

init: function() {
this.var1 = 0;
this.var2 = 1;

Does anyone know why this would solve it?
Page 1 of 1
« first « previous next › last »