c++ gossip npc

Hi

What is the new definition name of the "ADD_GOSSIP_ITEM " ?

bool OnGossipHello(Player* player, Creature* npc)
{
player->ADD_GOSSIP_ITEM

}

The compiler doesn’t know that definition… maybe I watched an old tutorial.

See this for example:
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/scripts/World/npcs_special.cpp#L1282-L1348

— Canned message start —
This thread is not related to the official Trinity codebase and was moved to the Custom Code section.
Please read the stickies next time.
— Canned message end —

Thanks !

I am trying to make a gossip npc which would Yell a text when I click on the gossip button, but ingame the npc doesn’t show the yell text.

My code:

 #include "ScriptMgr.h"

	 

	    class GossipTest : public CreatureScript

	{

	public:

	    GossipTest() : CreatureScript("GossipTest") {}

	        bool OnGossipHello(Player* player, Creature* npc)

	    {

	    

	        AddGossipItemFor(player, 0, "say something", GOSSIP_SENDER_MAIN, 1);

	        SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, npc);

	            return true;

	    }

	        bool OnGossipSelect(Player* player, Creature* npc, uint32 sender, uint32 uiAction)

	    {

	            if (!player)

	            return false;

	    

	        switch (uiAction)

	                case 1:

	        {

	            npc->Yell("yell something", 0);

	            CloseGossipMenuFor(player);

	            }

	            return true;

	    }

	    

	};

	    void AddSC_GossipTest()

	{

	    new GossipTest();

	}

Anyone have some ideas what can be the problem ?

Edit: I found the problem: I used accents in the text.