View Single Post
Old 04-20-2019, 01:05 PM   #206
hangnef
Human being with feelings
 
Join Date: Dec 2017
Posts: 23
Default

I'm hitting an issue w/ re-sizing my pattern. After doing it the script exits... with some debugging prints I've narrowed it down to this block of code:

function tracker:tryPreviousItem()
if ( self.lastItem and #self.lastItem > 0 ) then
local tryItem = self.lastItem[#self.lastItem]
self.lastItem[#self.lastItem] = nil
if ( reaper.ValidatePtr2(0, tryItem, "MediaItem*") ) then
self:useItem(tryItem)
else
self:tryPreviousItem()
end
else
print ('tryPreviousItem')
self:terminate() <--------- exits here, seems to get hit 4 times
end
end
hangnef is offline   Reply With Quote