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 DaveVoyles

I continue to get the error listed above for some reason, and I'm not sure why. It;s coming from entities-panel.js, and seems to occur when my player is being hit, or about to be killed.

It's annoying, because chrome keeps pausing when this happens. The odd thing is that it doesn't happen each time.

What do you think could be causing the issue?

Here is the draw() call from the .js file:


	draw: function() {
		this.parent();		
		
		// Collision Boxes
		if( ig.Entity._debugShowBoxes ) {
			ig.system.context.strokeStyle = this.colors.boxes;
			ig.system.context.lineWidth = 1.0;
			ig.system.context.strokeRect(	
				ig.system.getDrawPos(this.pos.x.round() - ig.game.screen.x) - 0.5,
				ig.system.getDrawPos(this.pos.y.round() - ig.game.screen.y) - 0.5,
				this.size.x * ig.system.scale,
				this.size.y * ig.system.scale
			);
		}

It occurs on the wto lines that set the pos.x.round and pos.y.round for the rectangle.

1 decade ago by Joncom

Your positions would appear to be set to "null".
Are you setting your position wrongly somewhere?

1 decade ago by DaveVoyles

Not that I'm aware of

1 decade ago by Joncom

If you're using Chrome, open dev-tools and click the little stop sign until it turns purple.

/><br />
<br />
That way, the app will pause whenever an uncaught exception (error) occurs, and you can inspect the variables. And in your case, you can investigate why they are <code>null</code>.			</div>
		</div>
	
	
<div class= Page 1 of 1
« first « previous next › last »