talamortis / OregonCore-Modules

Modules made for Oregoncore
20 stars 26 forks source link

AutoLearnSpell module compilation error #29

Closed turbosnek closed 2 years ago

turbosnek commented 2 years ago

Hello, I have compilation error in AutoLearnSpell Module.

This is my Error

C:\Users\Turbosnecek\Desktop\WowServer\Dev\OregonCore\modules\AutoLearnSpells\src\mod_LearnSpells.cpp(131,1): error C2440: 'initializing': cannot convert from 'QueryResult_AutoPtr' to 'QueryResult *' 3>C:\Users\Turbosnecek\Desktop\WowServer\Dev\OregonCore\modules\AutoLearnSpells\src\mod_LearnSpells.cpp(131,29): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

Can you help me where is the issue?

Thanks for your answer.

turbosnek commented 2 years ago

Compilation done. I change line 131 from: QueryResult* result = WorldDatabase.PQuery("SELECT spell FROM npc_trainer"); to: QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT spell FROM npc_trainer");

talamortis commented 2 years ago

Compilation done. I change line 131 from: QueryResult* result = WorldDatabase.PQuery("SELECT spell FROM npc_trainer"); to: QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT spell FROM npc_trainer");

This is the old way of doing it, new way is QueryResult*

Please update to latest core version.