FelipeMallmann Posted November 20, 2015 Share Posted November 20, 2015 (edited) Estou com uma duvida no break end. Se eu tenho i=1, e ele vai fazer o for até 10 por exemplo e ele der um break end quando i for 2, esse break end só cancela o i sendo 2 e passa para o i sendo 3, ou ele sai do for todo ?? Exemplo for i = 1,10 do if i == 2 then break end chat("numero "..i) end Esse codigo exibiria: 1,3,4,5,6,7,8,9,10 ou somente o 1? Obrigado Edited November 23, 2015 by Guest Link to comment
imCEASER Posted November 20, 2015 Share Posted November 20, 2015 o break vai parar seu for, faça isso for i = 1,10 do if i == 2 then i = 3 end chat("numero "..i) end Link to comment
FelipeMallmann Posted November 20, 2015 Author Share Posted November 20, 2015 Obrigado. Link to comment
imCEASER Posted November 22, 2015 Share Posted November 22, 2015 Nada Se possível, mude o título deste tópico para: [DÚVIDA|RESOLVIDO] Break end Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now