Help with collision

Apr 3, 2013 at 12:31 AM
I have this error tile index out of bound
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?
Apr 3, 2013 at 9:06 AM
Can you please post the exception message?
Apr 4, 2013 at 12:00 AM
I solvent this