nope. unfortunately
do ... end cannot be broken nor returned from. It is simply a way to limit scope. For example:
local foo
do
local bar = "Hello World!"
function foo()
print(bar)
end
end
foo() --# works
print( bar ) --# will print nothing, there's no variable bar that is in this or any parent scope
using
break you'd get an error along the lines of 'not inside loop' and using
return will exit whatever code block it is in, whether that's a function or the program.
Edited by theoriginalbit, 17 July 2014 - 04:05 PM.
added example