Skip to content
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.

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

expose EE version in lua #1078

Merged
merged 1 commit into from Oct 8, 2020
Merged

expose EE version in lua #1078

merged 1 commit into from Oct 8, 2020

Conversation

czenker
Copy link
Contributor

@czenker czenker commented Oct 8, 2020

This is how it could look like to prevent a scenario from loading in a too old version of EE. It is better than showing an arbitrary "this function does not exist" error somewhere during a running scenario.

local requiredVersion = 20200409
if getEEVersion == nil then
    error(string.format("This scenario requires EmptyEpsilon %d or higher", requiredVersion))
else
    local version = getEEVersion()
    if version ~= 0 and version < requiredVersion then
        error(string.format("This scenario requires EmptyEpsilon %d or higher, but you got %d.", requiredVersion, version))
    end
end

@daid daid merged commit 61639fc into daid:master Oct 8, 2020
olivier-vm pushed a commit to olivier-vm/EmptyEpsilon-Clones that referenced this pull request Aug 30, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants