Great, thanks for the quick reply!
In this example:
_, _, needed_value = my_function()
the _'s would overwrite the other in order of reading left to right, right? We just don't care about that because the value would never be needed again? But they don't have to be different names for the function to work?
Also is it possible to change the IDE to point to this
https://www.extremraym.com/cloud/reascript-doc
dictionary instead of the default one when you hit F1 on a function? I like that one better, but the F1 pointing is very helpful.
And I guess spaces don't matter to LUA, you could have everything on one line if you wanted?
How do you loop through a table with a for? Is using pairs(table) the go to method? I notice this works for consoledisplaymsgs so does pairs return strings?
Like this
Code:
numbers = {"one", "two", "three", "four"}
j= {}
for key, value in pairs(numbers) do
table.insert(j,reaper.ShowMessageBox(key, value, 1))
--reaper.ShowConsoleMsg(j)
end
Also this was driving me crazy the past hour, how come this didn't work?
Code:
function inttobool(int)
reaper.ShowConsoleMsg("int is :" .. int .. "\n")
if int == true then r = 1 else r = 0 end
return r
end
Does 1 = true and 0 = false? I was passing the value of 'playalltakes' into this function, and the playalltakes value was either 0.0 or 1.0, which I thought was just 'true' or 'false'. No?
It works now that I did
Code:
function inttobool(int)
reaper.ShowConsoleMsg("int is :" .. int .. "\n")
if int == 1.0 then r = 1 else r = 0 end
return r
end
But why did I have to do that? It didn't even work with 1 I had to put 1.0