lua/wrappers/game/lua_character.cpp
/**
	 * Sets the characters level.
	 * If the new level is higher than the characters current level,
	 * their experience is also set at the amount required to be that level.
	 * However a characters level cannot be set lower than what it currently is.
	 * The level cannot be set higher than a characters max level 
	 * if they have a max level set.
	 *
	 * It is generally recommended to use add_level instead of setting it directly.
	 * @param integer level The characters new level.
	 * @returns am.character This
	 */
Sets the characters level.
If the new level is higher than the characters current level,
their experience is also set at the amount required to be that level.
However a characters level cannot be set lower than what it currently is.
The level cannot be set higher than a characters max level
if they have a max level set.

It is generally recommended to use add_level instead of setting it directly.
@param integer level The characters new level.
Sets the characters level . If the new level is higher than the characters current level their experience is also set at the amount required to be that level . However a characters level cannot be set lower than what it currently is . The level cannot be set higher than a characters max level if they have a max level set . It is generally recommended to use add_level instead of setting it directly . @param integer level The characters new level .
int Character_level(lua_State *lua)
	{
		Character *obj = castUData<Character>(lua, 1);
		if (obj)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushinteger(lua, static_cast<lua_Integer>(obj->getLevel()));
				return 1;
			}
			else if (lua_isnum(lua, 2))
			{
				obj->setLevel(static_cast<short>(lua_tointeger(lua, 2)));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "level", "integer level");
		}
		return LuaState::expectedContext(lua, "level", "am.character");
	}
int Character_level ( lua_State * lua ) { Character * obj = castUData < Character > ( lua , 1 ) ; if ( obj ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushinteger ( lua , static_cast < lua_Integer > ( obj -> getLevel ( ) ) ) ; return 1 ; } else if ( lua_isnum ( lua , 2 ) ) { obj -> setLevel ( static_cast < short > ( lua_tointeger ( lua , 2 ) ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the characters level.
Sets the characters level .