Update buildinghelper.lua

reverted a change to pairs back to ipairs