Jump to content

Guild.Get_name() not work


Recommended Posts

Hello dev, i need problem, functions guild.get_name() or guild.name() dont work in my quests. I have 40k game

Spoiler

quest guild_name begin
    state start begin
        when 11000.chat."Gname" begin
            say(""..guild.get_name().."")
        end
    end
end

Where can be problem? Or how to fix it?

Thanks for your tips.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

	int guild_get_name(lua_State * L)
	{
		if (!lua_isnumber(L, 1))
		{
			lua_pushstring(L,  "");
			return 1;
		}

		CGuild * pkGuild = CGuildManager::instance().FindGuild((DWORD) lua_tonumber(L, 1));

		if (pkGuild)
			lua_pushstring(L, pkGuild->GetName());
		else
			lua_pushstring(L, "");

		return 1;
	}

That means, you have to enter the guild id. The function will return empty string if you don't

- Jodie

Link to comment
Share on other sites

38 minutes ago, Jodie said:

	int guild_get_name(lua_State * L)
	{
		if (!lua_isnumber(L, 1))
		{
			lua_pushstring(L,  "");
			return 1;
		}

		CGuild * pkGuild = CGuildManager::instance().FindGuild((DWORD) lua_tonumber(L, 1));

		if (pkGuild)
			lua_pushstring(L, pkGuild->GetName());
		else
			lua_pushstring(L, "");

		return 1;
	}

That means, you have to enter the guild id. The function will return empty string if you don't

- Jodie

Yes, it works when i type  guild.get_name(1), but i need use:
g_name = mysql_query("SELECT name FROM player.guild_dungeon WHERE id='1' LIMIT 1")[1][1]
if guild.get_name() == g_name then
 

and updating for name is:
update = mysql_query("UPDATE player.guild_dungeon SET name='"..guild.get_name().."' WHERE id='1' LIMIT 1")[1]

and i need to work automatically

 can you help me please?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.