Add StdLib and Rank Table

This commit is contained in:
Cooldude2606 committed 2017-07-01 17:20:18 +01:00
1 parent c96c7e85d8
commit aa3362d1ec
8 files changed
+412 -6

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
--- Core module
-- @module Core
Core = {} --luacheck: allow defined top
--- Errors if the variable evaluates to false, with an optional msg
-- @param var variable to evaluate
-- @tparam[opt='missing value'] string msg message
function Core.fail_if_missing(var, msg)
if not var then
error(msg or "Missing value", 3)
end
return false
end
return Core