Page 1 of 1

Command Version from Lua

Posted: Wed Jul 01, 2020 1:06 pm
by jkgarner
Is it possible to determine which version of command is running from Lua?

A change made between
P.E. Student Version 1.14.5.5
and
P.E. Student Version 1.15.2
which breaks my code.
(specifically the directory from which the lua scripts execute.)

As I start pushing out scenarios using my code, I need to be able to
determine which version of the software is running to make my code adaptive, so that it still works across multiple versions.



RE: Command Version from Lua

Posted: Wed Jul 01, 2020 2:06 pm
by KnightHawk75
GetBuildNumber() for the x.x.x.x or x.x # I forget which it is.

As for detecting pro.. if io then ... pro... else ...retail... end comes to mind, though I'm hoping some day that changes.

RE: Command Version from Lua

Posted: Wed Jul 01, 2020 2:49 pm
by jkgarner
In my current version,

Code: Select all

print(GetBuildNumber())
outputs:
v1.15.2

In my previous version,

Code: Select all

print(GetBuildNumber())
outputs:
v1.14.5.5

I can work with this.