0
  import kaboom from "kaboom";

// initialize context
kaboom();

addLevel([
  "!^^^^^^^^^^^^^^^     &",
  "!^^^^^^^^^^^^^^^     &",
  "!^^^^^^^^^^^^^^^     &",
  "!                    &",
  "!                    &",
  "!                    &",
  "!                    &",
  "!                    &",
  "!                    &",
  "!                    &",
  "!                    &",
  "!                    &",
], { 
  width: 30,
  height: 22,
  "^": () => [
    sprite("space")
  ],
  // "!": () => [
  //   sprite("wall", "left-wall")
  // ],
  // "&": () => [
  //   sprite("wall", "right-wall")
  // ]
  

}) 

I get this error, when I run the code, although I created the sprites: “sprite not found: “space””

Does someone know a solution? Thanks!

1 Answers1

0

I found the mistake, the img is registered as a Pedlit, so I had to use LoadPedlit()