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

Retreiving CC version from lua

Started by Cabu, 22 November 2012 - 11:11 PM
Cabu #1
Posted 23 November 2012 - 12:11 AM
Hi,

Is there a way from LUA to retreive the ComputerCraft version and not just the OS version.
In CC 1.46 there is a certain problem (turtles can't compare tree leaves) for wich i have a mitigation procedure. This problem should be solved in a later version (not tested yet). I want my program to check the CC version to choose the correct procedure to apply.

Thanks !
Grim Reaper #2
Posted 23 November 2012 - 12:09 PM
There isn't a way that I know of to grab the version of the mod itself, but you can reference the version of CraftOS that a computer is operating on.

Using os.getVersion(), you can obtain a string that contains the name and therefore the version of CraftOS/TurtleOS the computer/turtle is running. If you check with other versions of the mod, you can pinpoint which versions of CraftOS/TurtleOS correspond to which versions of ComputerCraft.