I'm trying to make a collision system for my game, however I am encountering a problem when trying to get the layers of my map file.
I get an error at this line
I'm not sure why, I don't know if it's a problem with my map file or something in my code, any help would be great!
I get an error at this line
collision = map.Layers[3];
It says "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"I'm not sure why, I don't know if it's a problem with my map file or something in my code, any help would be great!

.jpg)






