Script engine.version

In the format {1,4,0,"te4",17}
Where values are {major, minor, patch, enginename, ccore}

Functions

engine.version_check (v)

Check which version the engine is

engine.version_string (v)

Formatted engine string

engine.version_from_string ([s])

Takes a version string and turns it into a table

engine.version_compare (v, ev)

Compare two engine tables

engine.version_nearly_same (v, ev)

Compare two engine tables

engine.version_patch_same (v, ev)

Check if the two versions are identical



Functions

engine.version_check (v)
Check which version the engine is

Parameters:

Returns:

    "newer" if our version is newer

Or

    "lower" if our version is older

Or

    "same" if our versions are identical

Or

    "different engine" if it's an entirely different engine

Or

    "bad C core" if our c core is incorrect
engine.version_string (v)
Formatted engine string

Parameters:

Returns:

    "te4.v[1].[v2].v[3]"
engine.version_from_string ([s])
Takes a version string and turns it into a table

Parameters:

Returns:

    {1, 0, 0} if s is absent

Or

    {x, y, z} if in format "x.y.z"

Or

    {x, y, z, name=str} if in format "x.y.z.str"
engine.version_compare (v, ev)
Compare two engine tables

Parameters:

  • v table the version we want to know about
  • ev table the version to compare to

Returns:

    "newer" if our version is newer

Or

    "lower" if our version is older

Or

    "same" if our versions are identical
engine.version_nearly_same (v, ev)
Compare two engine tables

Parameters:

  • v table the version we want to know about
  • ev table the version to compare to

Returns:

    true if nearly the same

Usage:

     version_nearly_same({1.2.3}, {1.2.2}) = true
     version_nearly_same({1.3.0}, {1.1.5}) = true
     version_nearly_same({1.1.0}, {1.2.0}) = false
     version_nearly_same({0.9.2}, {1.2.2}) = false
engine.version_patch_same (v, ev)
Check if the two versions are identical

Parameters:

Returns:

    true if same
generated by LDoc 1.4.3