View Single Post
Old 05-24-2016, 03:08 PM   #1
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default Lua: "reaper.xyz is unknown"

Code:
counter = 0

function loop()
  counter = counter + 1
  reaper.ShowConsoleMsg(string.format("loop %d\n", counter))

  pcall(function()
    gfx.hello_world = 42
  end)

  if counter < 50 then
    reaper.defer(loop)
  end
end

loop()
Result:

When clicking on the "Continue" button in the error dialog, the loop() function is ran only twice, instead of 50 times:



Expected:

No error dialog at all (because of pcall), or a least it should not abort the script when clicking on the Continue button.

Last edited by cfillion; 07-19-2016 at 06:16 PM. Reason: it's partialy fixed in v5.23pre1+v5.23pre2 :D
cfillion is offline   Reply With Quote