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

Lua

Started by Rougeminner, 28 September 2014 - 08:46 PM
Rougeminner #1
Posted 28 September 2014 - 10:46 PM
I have looked everywhere and i can't find out how to run a lua script on my mac. I know this is way out in left field and has nothing to do with CC but i need help. i can run the lua 'shell' which is like the lua program in CC but i can not load the file in either of them i can't execute it period.

please help.
Edited on 28 September 2014 - 08:48 PM
oeed #2
Posted 28 September 2014 - 11:41 PM
First off, this isn't really the right spot, but don't worry, a moderator will probably move it soon.

What are you trying to do? If you're wanting to make CC programs without running Minecraft then you want an emulator. Take a look the general section, there are quite a few. I've also got a standalone one for Mac I can give you if you PM me.

If you just want to run Lua and not the CC APIs. If so it shouldn't be too hard, take a look at these sites:
http://stackoverflow...ll-lua-on-macos
http://www.lua.org/download.html
Edited on 28 September 2014 - 09:41 PM
Lyqyd #3
Posted 28 September 2014 - 11:57 PM
Moved to General.
Bomb Bloke #4
Posted 29 September 2014 - 01:47 AM
I just use repl.it, a web-based interpreter.
Rougeminner #5
Posted 01 October 2014 - 06:56 AM
thank you lyqyd i didn't know where this belonged.
@oeed I am trying to run real lua with out any emulators. I have tried many CC emulators and non of them worked for me. so before i moved on to Swift i figured i would try Lua. i have completely installed lua on my mac.
mistertimn #6
Posted 05 October 2014 - 08:14 PM
I write Lua scripts in Sublime Text 2 on my Mac, and you can just execute the scripts in Terminal. Just navigate to the directory where you have your script with 'cd <directory>' and run it with 'lua <filename>'.
electrodude512 #7
Posted 05 October 2014 - 11:41 PM
I write Lua scripts in Sublime Text 2 on my Mac, and you can just execute the scripts in Terminal. Just navigate to the directory where you have your script with 'cd <directory>' and run it with 'lua <filename>'.

But you have to install lua before that will work. Also, you might want lua 5.1 and not 5.2, because that's what CC uses.
mistertimn #8
Posted 05 October 2014 - 11:53 PM
-snip-

I'm pretty sure that OS X comes with Lua installed. The Lua.org website says that 'If you use Linux or Mac OS X, Lua is either already installed on your system or there is a Lua package for it.' I don't recall if I had to install anything when I starting programming.