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

8 years ago by BlairH

Hello,

I was wondering if anyone has encountered this problem with Internet Explorer crashing on an external function.

My game only crashes on Explorer and not on any other browser.

The function below is in my main.js file, not that it matters.

This is the error I get from Explorer.

ScriptError 1003 missing : on line 48 in main.js.

On line 48 I have the following function.

bezierPointX (Ax,Bx,Cx,Dx,t) {

}

Can anyone shed some light on this?
Also, could someone provide a pointer on how to cut & paste into the Forum.

Thanks,
Blair,

8 years ago by Joncom

There's a few ways you can define a function:

// Normally
function bezierPointX(Ax,Bx,Cx,Dx,t) {
    ...
}

// As a variable
var bezierPointX = function(Ax,Bx,Cx,Dx,t) {
    ...
};

// As a property inside an object
{
    bezierPointX: function(Ax,Bx,Cx,Dx,t) {
        ...
    }
}

If you're defining bezierPointX along with your game init, update, and draw functions, then follow the third method.

(You can click "Show Formatting Help" on this page to see how to post formatted code.)
Page 1 of 1
« first « previous next › last »