badfitz99
|
  |
| Joined: 01 May 2010 |
| Total Posts: 5854 |
|
|
| 22 Jun 2014 08:43 AM |
| Let's say I have a script that checks if all players are dead (using a boolean). When they're all dead it restarts the main function. Is there a way to stop the function where it is? |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2014 08:45 AM |
| Not sure if it is what you want, but adding "break" ends the function |
|
|
| Report Abuse |
|
|
badfitz99
|
  |
| Joined: 01 May 2010 |
| Total Posts: 5854 |
|
| |
|
|
| 22 Jun 2014 08:49 AM |
| I've not really used coroutines so I couldn't say sorry |
|
|
| Report Abuse |
|
|
ajmhm1111
|
  |
| Joined: 22 Jun 2013 |
| Total Posts: 164 |
|
|
| 22 Jun 2014 08:54 AM |
@MasterDaniel
break does not end functions, only loops.
--ajmhm1111 |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2014 09:06 AM |
| oh mybad. It ends functions in vb.NET and I don't really use it in Lua xD |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2014 09:08 AM |
oh actually it doesn't :p, its "Exit Function" in vb.NET. Anyway all I could think of was break, sorry I couldn't help |
|
|
| Report Abuse |
|
|