I've got a bit of code that looks like this:
var mx:Int = Std.int(FlxG.mouse.screenX / player.sprite.width);
I get an invalid field access error when accessing the width property: Invalid field access : get_width
I've tried just hardcoding player.sprite.width to a number like so:
var mx:Int = Std.int(FlxG.mouse.screenX / 32);
and all it seems to do is defer this error until later when I access the x property of the sprite:
I'm not sure why this is happening, the sprite is definitely instantiated as I can see it onscreen - wondering if anyone can shed light on what this error message means?