• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

Lua compiler (2 Viewers)

Herly Quijano

Newcomer
Joined
Mar 19, 2021
Messages
62
Reaction score
4
I wanna test if some methods I created using Lua, but I don't where can I get its own compiler if is not a game that uses Lua, and I don't wanna open it everytime I need test something simple, is there a "basic compiler"?
 

Sonazuma

Administrator
Staff member
Joined
Jan 6, 2020
Messages
34
Reaction score
11
If you have Lua installed on your system, just run
Code:
lua yourfile.lua
in your terminal (or cmd).

Btw, if anyone's interested in creating an online Lua text editor + interpreter for this forum, please message me. There's already a Lua VM written in JS.
 

stetre

Member
Rank: I
Joined
Jan 8, 2020
Messages
89
Reaction score
49
Location
Italy
Website
github.com
Even on Windows, once you have Lua installed (see @Sonazuma 's last post) you should be able to execute the Lua interpreter from the Windows prompt, like this:

Code:
lua.exe yourfile.lua

This should work, as long as the path to lua.exe is listed in the PATH variable.
 
Top