The mapWidth, mapHeight, build_patternsize, tilesize are all constants declared in another include file. The reason I am trying to convert from floating point to integer is so that my array will work....The position is floating point while the array has to be integer...I think the converting process somewhere is wrong...Does this sound right?