lua/wrappers/game/lua_stats.cpp
/**
	 * Adds a stat modifier instance to this stats collection of modifiers.
	 * @see am.stat_modifiers
	 *
	 * @param string stat_name The name of the stat this modifier will affect.
	 * @param am.stat_modifier mod The stat modifier to add.
	 * @returns integer Return code for success.
	 * <ul>
	 * <li>1: The stat modifier was added successfully.</li>
	 * <li>0: The context object was not a stats object.</li>
	 * <li>-1: The given stat name was invalid.</li>
	 * <li>-4: The given stat modifier was not a valid stat modifier instance.</li>
	 * </ul>
	 */
Adds a stat modifier instance to this stats collection of modifiers.

@param string stat_name The name of the stat this modifier will affect.
@param am.stat_modifier mod The stat modifier to add.
@returns integer Return code for success.

1: The stat modifier was added successfully.
0: The context object was not a stats object.
-1: The given stat name was invalid.
-4: The given stat modifier was not a valid stat modifier instance.

Adds a stat modifier instance to this stats collection of modifiers . @param string stat_name The name of the stat this modifier will affect . @param am . stat_modifier mod The stat modifier to add . @returns integer Return code for success . 1 : The stat modifier was added successfully . 0 : The context object was not a stats object . - 1 : The given stat name was invalid . - 4 : The given stat modifier was not a valid stat modifier instance .
int Stats_add(lua_State *lua)
	{
		Stats *stats = castUData<Stats>(lua, 1);
		if (stats)
		{
			lua_pushinteger(lua, addToStatModifier(lua, stats));
			return 1;
		}
		return LuaState::expectedContext(lua, "add", "am.stats");
	}
int Stats_add ( lua_State * lua ) { Stats * stats = castUData < Stats > ( lua , 1 ) ; if ( stats ) { lua_pushinteger ( lua , addToStatModifier ( lua , stats ) ) ; return 1 ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Adds a stat modifier instance to this stats collection of modifiers.
Adds a stat modifier instance to this stats collection of modifiers .