How would one go about making sure that a .love file only runs if the current version of LOVE2D is better than a given minimum version? Without some sort of check, the resulting errors can be obscure and seemingly unrelated to the LOVE version, requiring the user to waste a lot of time trying to diagnose issues based on misleading errors.
Share
You can add
t.version = "0.8.0"to yourconf.luaand it will warn the user if he is using a version other than 0.8.0. You shouldn’t block mismatched versions, you should warn them.Here’s an example of
conf.lua:Here‘s the wiki article on
conf.lua.