Jump to content

Goto line in lua


Recommended Posts

Hi,

I don't know if it's the right section, but I think it's the right one.

Is it possible to label a bunch of code and then go to it with the function goto label.

Like:

(I know this code isn't anything, just for an example xD)

A:
if a == b then
  a = a + b
end

and then later on in your script

if a == b then
  goto A
end

So my question is: Is this possible, if yes, how?

Greetz,

MILKSHAKE.

Link to comment
Hmm, you actually brought me on an idea :P. First I thought that wasn't possible, but after some more thinking I think I can make it that way. Ty xD

This is what you should do even in languages which support goto.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...