You can't use multiple returns in a sub in lua? I thought this was possible...
You Can use multi-returns in LUA.... but thier can be only one END to a function.
Its a difference between euo and lua... in lua .. return just defines the result vars that are returned when the function ENDS. In EUO return is a combo statment in lua = 'return <vars> End'
Thierfor transalating
sub xx
if x=y return x
set x x*100
if x < y return y
return what
function xx()
if x == y then return x end
x = x*100
if x<y return y
return what
end
in euo this = 3 possible different return values x y and what
In lua it only = what as thats the last return values set before final end statment.
Thierfore transalting subs with multiple returns will end up with code that doesnt represent the true meaning of the original sub. as you can only only exit a function at one point where as you can exit a sub form many points .. the 3 big problems break./continue gotos multi returns. all un auto translatable...
EDIT : INCORRECT .. multiple returns are allowed in LUA .. i was wrong and my test code had an error in it. so malfunctioned DURRRR....
Give me another bigger one to translate... one of the biggest things it will acheive is pure time in replacing standard stuff...