function love.load() enums.gamestates.main = false end function love.update(dt) if enums.gamestates.main == true then --Some sort of code else error(errors.invalidGamestate..type(enums.gamestates.main)) end end