Greak5245
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 235 |
|
|
| 07 Sep 2014 12:16 PM |
| If your statement turns false in a while loop. Then it turns back true, the loop will start again right? |
|
|
| Report Abuse |
|
|
Vuva
|
  |
| Joined: 22 Jan 2010 |
| Total Posts: 1102 |
|
|
| 07 Sep 2014 12:22 PM |
No, it won't start again. But you could have it in a function to start it up again
Variable=true function StartLoop() while Variable do --stuff end end StartLoop() |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2014 12:41 PM |
Or you could just do something like this
while true do if variable then -- do stuff end end |
|
|
| Report Abuse |
|
|
Greak5245
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 235 |
|
|
| 07 Sep 2014 12:51 PM |
| @nicemike40 How will that start the while loop? |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 07 Sep 2014 12:53 PM |
| It doesn't start it, but it prevents the loop from ever stopping in the first place. |
|
|
| Report Abuse |
|
|
Greak5245
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 235 |
|
|
| 07 Sep 2014 01:51 PM |
| Well, that does not help me at all. |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2014 01:53 PM |
enabled = true
while enabled do -- stuff end |
|
|
| Report Abuse |
|
|
Greak5245
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 235 |
|
|
| 07 Sep 2014 01:57 PM |
| @EliteDerper That is even more useless. I know how a while loop work. @Vuva's script works so the problem is fixed. Ty Vuva ^^ |
|
|
| Report Abuse |
|
|
Greak5245
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 235 |
|
|
| 07 Sep 2014 01:59 PM |
Elite what you said was basicaly
while true do --code end
Just with a way to shut it down. |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2014 02:11 PM |
| You can enable and disable it, its not useless you just have to know how to script. |
|
|
| Report Abuse |
|
|