https://arcade.makecode.com/S03165-44096-22888-81950 my game has an error can anyone help

https://arcade.makecode.com/S03165-44096-22888-81950 my code is not letting me spawn on the right place. pls help

4 Likes

You were having the problem because you were trying to place the sprite on a tile that didn’t exist yet. This can be fixed by declaring the tilemap before placing the sprite.

1 Like

I am not sure what the right place to spawn should be, but here is an example on line 186 which sets the spawn position to wherever the player sprite is:
spawnposition

1 Like

thanks

4 Likes

thanks man😁

3 Likes

Here’s an informative article, maybe related:

1 Like