lua/wrappers/game/lua_character.cpp
/**
	 * @static
	 * Looks for a character with the given game id.
	 * Nil is returned if it is not found.
	 * @param string game_id The game id to look up
	 * @returns am.character The found character or nil
	 */
@static
Looks for a character with the given game id.
Nil is returned if it is not found.
@param string game_id The game id to look up
@returns am.character The found character or nil
@static Looks for a character with the given game id . Nil is returned if it is not found . @param string game_id The game id to look up @returns am . character The found character or nil
int Character_find(lua_State *lua)
	{
		if (lua_isstr(lua, 1))
		{
			Character *obj = dynamic_cast<Character *>(Engine::getEngine()->getGameObject(lua_tostring(lua, 1)));
			if (obj)
			{
				wrapRefObject<Character>(lua, obj);
				return 1;
			}
			lua_pushnil(lua);
			return 1;
		}
		return LuaState::expectedArgs(lua, "@find", "string game_id");
	}
int Character_find ( lua_State * lua ) { if ( lua_isstr ( lua , 1 ) ) { Character * obj = dynamic_cast < Character * > ( Engine :: getEngine ( ) -> getGameObject ( lua_tostring ( lua , 1 ) ) ) ; if ( obj ) { wrapRefObject < Character > ( lua , obj ) ; return 1 ; } lua_pushnil ( lua ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; }
@static
 Looks for a character with the given game id.
@static Looks for a character with the given game id .