procedure chkForLvl1Block loop curItemPosition := curItemPosition + 1 if ypos > 149 then if mapPartsArray (curItemPosition, 2) = "1" then if (curItemPosition * 30 - xpos) > 269 then if (curItemPosition * 30 - xpos) < 301 then groundHeight := 150 exit when 1 = 1 else groundHeight := 60 end if end if end if end if if curItemPosition = mapLength then exit when 1 = 1 end if end loop end chkForLvl1Block