Domanda

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
}
È stato utile?

Soluzione

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

do
   -- Code
end
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top