on getCommonPath (pathes, sep) _player.itemDelimiter = sep -- find length of shortest path (in terms of items) commonCnt = the maxInteger repeat with p in pathes if p.item.countpathes[j-1].item[i] then return pathes[1].item[1..i-1] end if end repeat end repeat return pathes[1].item[1..commonCnt] end