Putting a "break" breaks the entire loop, instead of only one iteration

for i=1,5 do
	print(123)
	break
end

It only prints 123 once

Is there a built in function to just break that single iteration, instead of halting the entire loop?

I think I understand what you are after?

In place of break you can use continue, which goes to the next step of the loop.

i.e.

for i=1,5 do
	print(123)
	continue
end
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.