This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
looler's profile picture

goto function

Started by looler, 19 March 2012 - 06:45 PM
looler #1
Posted 19 March 2012 - 07:45 PM
hey, i got a problem with the goto function i know how to do it in lua.

goto example
::example::
print("blabla")

but when i tried this in a script it trows me an error.
So how do i do the goto function in this mod?
Liraal #2
Posted 19 March 2012 - 08:18 PM
there is no goto as goto may lead to shark attacks and/or meteorite showers (sarcasm alert)

actually there doesn't seem to even be goto in lua, and there certainly isn't one in CC
Luanub #3
Posted 19 March 2012 - 08:54 PM
Use functions, much cleaner.


function example()
print ("Example")
end

example()