I have this error tile index out of bound
I use this code
I use this code
public bool getCollision(Vector2 posf,Layer Collision,int TileIndex,float scale, vars v)
{
tileLocation = new Location((int)((int)posf.X / 8*3 ), (int)posf.Y / 8*3);
t = Collision.Tiles[tileLocation];
// if (t.TileIndex == 0)
// return true;
return false;
what is the error?

.jpg)








