10000 Provide means for Orbiter to pass which Lua version it is using · Issue #568 · orbitersim/orbiter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Provide means for Orbiter to pass which Lua version it is using #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

8000

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ThChicken opened this issue Mar 2, 2025 · 4 comments
Open

Provide means for Orbiter to pass which Lua version it is using #568

ThChicken opened this issue Mar 2, 2025 · 4 comments

Comments

@ThChicken
Copy link

If Orbiter could somehow communicate through the Lua Interpreter which version of Lua it uses, that would permit add on developers the opportunity to maintain backward compatibility with different Lua (and related Orbiter) versions for deprecated methods.

For example, Lua 5.1 uses a loadstring function to convert a string of text into an executable statement. After 5.1 that is deprecated and absorbed into the functionality of the load function.

@TheGondos
Copy link
Contributor
TheGondos commented Mar 2, 2025

There is a _VERSION global that [currently] returns "Lua 5.1", does that fit your need?

@ThChicken
Copy link
Author

That seems that it would work. Searching for _VERSION, I find LUA_VERSION and several other useful globals like LUA_RELEASE in Lua.h. Is the usage in the script _VERSION, or LUA_VERSION, or am I looking at the wrong globals?

This would be a handy bit of information if it could be found in the documentation somewhere. It's not in Orbiter_lua.chm.

@TheGondos
Copy link
Contributor

This is standard Lua, not Orbiter specific.
Try "print(_VERSION)" inside a Lua console.

@ThChicken
Copy link
Author

OK, I see.

Seeing that there are few other Lua global variables, it might be useful to document just this in the Orbiter_Lua.chm, and pointing the reader to www.lua.org for further information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0