문제

Like in some languages, you can add brackets to specify code. Is there something which I can do in Lua to split sections of my code up similar to the example below?

{
    //Code
}
도움이 되었습니까?

해결책

Yes, you can create a scope with do ... end

do
   -- Code
end
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top