1 decade ago by Joncom
Since ImpactJS 1.20, Dominic has recommended using strict mode.
I tried adding the line
reflection.js (one of my entities):
Results in the following two errors:
I tried adding the line
"use strict"; to the top of my module, and it immediately broke. I'm not quite sure what I can do to fix this.reflection.js (one of my entities):
ig.module('game.entities.non-weltmeister.reflection')
.requires('impact.entity')
.defines(function() { "use strict";
EntityReflection = ig.Entity.extend({ // line 7
// ...etc.
Results in the following two errors:
Uncaught ReferenceError: EntityReflection is not defined reflection.js:7I can get rid of the first error by adding
Uncaught ReferenceError: EntityReflection is not defined main.js:229
var to the front of line 7. But that effectively makes EntityReflection a local var and so, it is still not accessible in main.js 