lua/wrappers/game/lua_character.cpp
/**
	 * Sets the age of the character.
	 *
	 * @param number age The new characters age
	 * @returns am.character This.
	 */
Sets the age of the character.
@param number age The new characters age
@returns am.character This.
Sets the age of the character . @param number age The new characters age @returns am . character This .
int Character_age(lua_State *lua)
	{
		Character *obj = castUData<Character>(lua, 1);
		if (obj)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushnumber(lua, obj->getAge());
				return 1;
			}
			else if (lua_isnum(lua, 2))
			{
				obj->setAge(lua_tofloat(lua, 2));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "age", "number age");
		}
		return LuaState::expectedContext(lua, "age", "am.character");
	}
int Character_age ( lua_State * lua ) { Character * obj = castUData < Character > ( lua , 1 ) ; if ( obj ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushnumber ( lua , obj -> getAge ( ) ) ; return 1 ; } else if ( lua_isnum ( lua , 2 ) ) { obj -> setAge ( lua_tofloat ( lua , 2 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the age of the character.
Sets the age of the character .