I am trying to make a Tetris game in JavaScript, but on line 96, there is an error. Can someone please explain the problem? (The function createL is used to create an L shaped block)
Issue is here:
when you create the sprite projectileL2
, you pass in img` `
, which evaluates to null
. Passing a null image to a sprite currently throws. easy fix is to press the little palette to expand it; if you don’t want it to show up on the screen, you can set it to have the invisible sprite flag.
e.g.
Thanks! They work now
The L
1 Like