crystal.const.get

Reads the value of a constant.

Usage

crystal.const.get(name)

Arguments

Name Type Description
name string Name of the constant.

Examples

crystal.const.define("EnemyHP", 100, { min = 1, max = 1000 });
print(crystal.const.get("EnemyHP")); -- prints 100

This site uses Just the Docs, a documentation theme for Jekyll.