PDA

View Full Version : TrinityCore 3.3.5 Item gossip compiling error

BuxBunny
06-16-2016, 08:22 PM
Hello,
this is the script I'm using (took the example from Rochet2)
http://pastebin.com/D9M8cqrL

Getting this

Severity Code Description Project File Line Suppression State
Error C3668 'reborn_stone::OnGossipSelect': method with override specifier 'override' did not override any base class methods scripts C:\Users\root\Desktop\TrinityCore\src\server\scrip ts\Custom\stone.cpp 27

Severity Code Description Project File Line Suppression State
Error (active) member function declared with 'override' does not override a base class member scripts c:\Users\root\Desktop\TrinityCore\src\server\scrip ts\Custom\stone.cpp 27

Tommy
06-16-2016, 08:31 PM
OnGossipSelect is not a member of "ItemScript" by default so adding override next to it will throw an error.

Rochet2
06-16-2016, 08:32 PM
Most likely you did not add the item gossip patch that the script needs.

BuxBunny
06-16-2016, 08:43 PM
OnGossipSelect is not a member of "ItemScript" so adding override next to it will throw an error. Where did Rochet2 give his example at?

From here:

https://github.com/Rochet2/TrinityCore/blob/playeritemgossip/src/server/scripts/Custom/Player%20and%20Item%20Gossip/ExampleItemGossip.cpp

So, I removed the "override" and the compiling worked, replaced hearthstone here's the SQL :

INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `VerifiedBuild`) VALUES (6948, 15, 0, -1, 'User Stone', 6418, 4, 4, 0, 1, 0, 0, 0, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, '', 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 'reborn_stone', 0, 0, 0, 0, 0, 12340);

But it's not working
http://prntscr.com/bh9q4f
When I click on anything nothing happens

- - - Updated - - -

Most likely you did not add the item gossip patch that the script needs.

Well duh !
Dumb me, sorry haven't slept in 16 hours now, I'm really tired
So I tried merging here's what it gives :
On : git pull rochet2 playeritemgossip

\$ git pull rochet2 playeritemgossip
remote: Counting objects: 689, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 689 (delta 153), reuseReceivid 150 (delta 150), pack-reused 509
Receiving objects: 100% (689/689), 177.85 KiB | 0 bytes/s, done.
Resolving deltas: 100% (432/432), completed with 61 local objects.
From https://github.com/Rochet2/TrinityCore
* [new branch] playeritemgossip -> rochet2/playeritemgossip
Auto-merging src/server/game/Scripting/ScriptMgr.cpp
Auto-merging src/server/game/Handlers/MiscHandler.cpp
CONFLICT (content): Merge conflict in src/server/game/Handlers/MiscHandler.cpp
Automatic merge failed; fix conflicts and then commit the result.

BuxBunny
06-17-2016, 12:14 AM
Ok, so I removed the old comments for less spamming.
I tried the example script, the item pops the menu, but the commands aren't working sadly :(

http://pastebin.com/vfru1KXx

Rochet2
06-17-2016, 03:58 PM
The problem is that you have not successfully applied the item gossip patch and you removed the "override" keyword from the code that tries to prevent the code from compiling when you miss the patch.
Add the "override" back and the compile should fail.
If it fails (and likely will) you need to apply the item gossip patch.

It was said somewhere that you have Eluna and you try to use the item gossip patch.
Unfortunately Eluna already has item gossip, but it doesnt enable it for C++ scripting.
You can try to apply the item gossip patch, but you have to manually solve the conflicts. You can do this by doing git pull rochet2 playeritemgossip as you did before
but after that you need to do git status and see what files are red/unstaged/at the bottom. You need to open those files and solve the conflicts in them.
The conflicts are marked with:
<<<
// code
===
// code
>>>

In this the codes are what you had at the time of pulling. above is what you had, below is what you pulled.
Solving the conflict means just fixing the code to the way it should be.

BuxBunny
06-17-2016, 06:56 PM
The problem is that you have not successfully applied the item gossip patch and you removed the "override" keyword from the code that tries to prevent the code from compiling when you miss the patch.
Add the "override" back and the compile should fail.
If it fails (and likely will) you need to apply the item gossip patch.

It was said somewhere that you have Eluna and you try to use the item gossip patch.
Unfortunately Eluna already has item gossip, but it doesnt enable it for C++ scripting.
You can try to apply the item gossip patch, but you have to manually solve the conflicts. You can do this by doing git pull rochet2 playeritemgossip as you did before
but after that you need to do git status and see what files are red/unstaged/at the bottom. You need to open those files and solve the conflicts in them.
The conflicts are marked with:
<<<
// code
===
// code
>>>

In this the codes are what you had at the time of pulling. above is what you had, below is what you pulled.
Solving the conflict means just fixing the code to the way it should be.

it all makes sense now, thanks for taking the time to answer me,
I'll re-clone TC and just use the same DB, without Eluna.

BuxBunny
06-17-2016, 11:05 PM
Works like a charm, thank you very much, I'll release that here soon.