[HELP] Gameobject starts not the Script

hello,

i will learn to create own scripts or fixx buggy scripts
I would create the Ribbon Pole…

My Script:

#include “ScriptMgr.h”
#include “SpellMgr.h”
#include “SpellInfo.h”
#include “Player.h”
#include “AchievementMgr.h”

class go_Ribbon_Pole : public GameObjectScript
{
public:
go_Ribbon_Pole() : GameObjectScript(“go_Ribbon_Pole”) { }

bool OnGossipHello(Player* player, GameObject* go) override
{

if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER){
Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST);
uint32 itemID = item->GetEntry();
if (itemID == 34685){
sWorld->SendServerMessage(SERVER_MSG_STRING, “Brust-Teil Angelegt”);
}
}

return false;
}

};

void AddSC_go_Ribbon_Pole()
{
new go_Ribbon_Pole();

}
And in Scriptloader:

#ifdef SCRIPTS
/* This is where custom scripts’ loading functions should be declared. */
void AddSC_go_Ribbon_Pole(); // The Ribbon Pole

#endif

void AddCustomScripts()
{
#ifdef SCRIPTS
/* This is where custom scripts should be added. */
AddSC_go_Ribbon_Pole(); // The Ribbon Pole
#endif
}

so and the GameObject
is scriptName set to “go_Ribbon_Pole” without the "

so i click on the Ribbon Pole and nothing happen i equip the Item 34685 is a Chest now i click on the Ribbon Pole and again nothing happen…

Sry for my bad english…

What type is the gameobject? Can we get more info about that?
Is it type 10?
Maybe you could try debug and see how the code executes.

Do note that if you had no item equipped, the core probably crashed. Check that the item exists before using it.

class go_Ribbon_Pole : public GameObjectScript
{
public:
    go_Ribbon_Pole() : GameObjectScript("go_Ribbon_Pole") { }
    
    bool OnGossipHello(Player* player, GameObject* go) override
    {
        if (go->GetGoType() != GAMEOBJECT_TYPE_GOOBER)
            return true;
            
        Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST);
        if (!item)
            return true;
            
        uint32 itemID = item->GetEntry();
        if (itemID == 34685){
            sWorld->SendServerMessage(SERVER_MSG_STRING, "Brust-Teil Angelegt");
        }
        
        return true;
    }
};

Yea sry

here the full GameObject

INSERT INTO world.gameobject_template
(entry, type, displayId, name, IconName, castBarCaption, unk1, faction, flags, size, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, data0, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13, data14, data15, data16, data17, data18, data19, data20, data21, data22, data23, AIName, ScriptName, VerifiedBuild)
VALUES
(‘181605’, ‘10’, ‘6771’, ‘Ribbon Pole’, ‘’, ‘’, ‘’, ‘0’, ‘4’, ‘1’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘29710’, ‘0’, ‘181604’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘’, ‘go_Ribbon_Pole’, ‘12340’);

Yes the gameobject type is 10, Flags is 4

Ah okay for debug i need to create a new DB on my local System

Okay but the Core Crash not if i have no item…

----Edit------
It works, wrong core Compiled…