|
| 07 Oct 2013 03:23 PM |
I am trying to break a loop with "break" the problem is, I'm not sure if the scope of it will work within a loop.
the if statement breaks the loop if a certain condition is true, but it doesn't seem to work:
if #alive == 1 then break end
this if is inside the loop |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
| |
|
|
| 07 Oct 2013 03:26 PM |
| As long as you are not trying to break a loop from within another loop (loop-ception), then it will work. |
|
|
| Report Abuse |
|
|
|
| 07 Oct 2013 03:27 PM |
| Nevermind, I think I fixed it, I'll post here if it doesn't |
|
|
| Report Abuse |
|
|