Pregunta

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
}
¿Fue útil?

Solución

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

do
   -- Code
end
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top