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

lua IDE and lua code question

Started by buzzawak, 14 July 2017 - 04:09 AM
buzzawak #1
Posted 14 July 2017 - 06:09 AM
two questions for the pro's

Question 1)
I am after a recommendation for a LUA IDE for windows 7 64

Question 2)
Using a windows LUA binary 5.3.4 in interactive mode I can use 'os.date()' and I get –> 7/14/17 15:06:10
If I do the same thing in game I get –> attempt to call nil
Why is this so ?


Thanks
Edited on 14 July 2017 - 04:30 AM
SquidDev #2
Posted 14 July 2017 - 07:35 AM
I am after a recommendation for a LUA IDE for windows 7 64
Looks like you had a Lua Uppercase Accident :P/>.

Right, this depends on what you mean by an "IDE". You're not going to get anything quite like a IntelliJ or Visual Studio, as Lua isn't that sort of language. However, you've got a range of editors which are at least better than ComputerCraft's one:
  • Editors with basic syntax highlighting, such as Vim, Emacs, VSCode or Atom. Most of these editors have extensions for debugging and linting Lua, though I cannot comment on how good they are.
  • Editors with a bit of knowledge about the language, such as this IntelliJ plugin. This provides some very basic auto-completion and smarter syntax highlighting (different fonts for globals, upvalues, etc…). There is also a similar plugin for Eclipse.

Using a windows LUA binary 5.3.4 in interactive mode I can use 'os.date()' and I get –> 7/14/17 15:06:10 If I do the same thing in game I get –> attempt to call nil
It's important to note, that (in Dan's words) the CC "os" API has nothing to do with the standard "os" API. Whilst most APIs (such as math, string, coroutine, etc…) are identical, the os is fundamentally different. There have been attempts to emulate the os API in ComputerCraft, but you cannot use such methods normally.
buzzawak #3
Posted 14 July 2017 - 11:25 AM
Thanks SquidDev
I like the look of Eclipe, so will give it a go.
M.O.O.N
Wilma456 #4
Posted 14 July 2017 - 11:27 AM
ZeroBraine Studio is a IDE that is coded for Lua.
Edited on 14 July 2017 - 09:27 AM
Lupus590 #5
Posted 14 July 2017 - 12:32 PM
I use Notepad++ for my Lua edititing, the 32bit version has more plugins than the 64bit one.