Version of Lua
Version of Lua
What version of Lua can be used with Love2d? I'm new to Lua and Love2d so I'm kind of clueless on were to begin . Any extra advise will be greatly appreciated.
Re: Version of Lua
The official binaries of LÖVE use Lua 5.1. It can't do 5.2 at this point. However, you may find LuaJIT builds here and there. One example is the love package on Arch Linux.
If you want to find out what interpreter version is running, you can look at the global variable _VERSION.
Or a little more verbose.
The Lua Reference Manual describes the language in great detail. It is a bit of a dry read, so you could also take a look at Programming in Lua. The 5.0 version is slightly outdated, but the basics of Lua didn't change and it's available for free online.
If you want to find out what interpreter version is running, you can look at the global variable _VERSION.
Code: Select all
print(_VERSION)
Code: Select all
io.write(_VERSION)
if jit then
io.write(" - ")
if type(jit.version) == "string" then
io.write(jit.version)
else
io.write("LuaJIT")
end
if not #setmetatable({},{__len=function()end}) then
io.write(" with 5.2 compatibility")
end
elseif _VERSION == "Lua 5.2" and loadstring then
io.write(" (5.1 compatibility)")
end
io.write("\n")
Shallow indentations.
Who is online
Users browsing this forum: No registered users and 5 guests