| View previous topic :: View next topic |
| Author |
Message |
Julu Julu
Joined: 01 Nov 2005 Posts: 9 Location: Germany
|
Posted: Sun Nov 13, 2005 6:27 am Post subject: goto in Luaplayer ? |
|
|
Hi.
In the programming language C, there is an instruction -> goto
Has Luaplayer this instruction ?
Example:
| Code: |
for x=0,100 do
for y=0,100 do
if y == 50 then
goto abc
end
end
end
abc:
...
|
How can i break the 2 for's? |
|
| Back to top |
|
 |
KawaGeo
Joined: 27 Aug 2005 Posts: 191 Location: Calif Mountains
|
Posted: Sun Nov 13, 2005 6:36 am Post subject: |
|
|
Nope. Use "break" instead.
Note: one break from the inner loop. You need another break for the next loop if necessary. _________________ Geo Massar
Retired Engineer |
|
| Back to top |
|
 |
chaos
Joined: 10 Apr 2005 Posts: 135
|
Posted: Sun Nov 13, 2005 9:35 am Post subject: |
|
|
functions are your friend.. why not use one of those instead? _________________ Chaosmachine Studios: High Quality Homebrew. |
|
| Back to top |
|
 |
|