Premium TAUMP 855 Posted March 7, 2015 Premium Share Posted March 7, 2015 (edited) Open char_battle.cpp to->PointChange(POINT_EXP, iExp, true); from->CreateFly(FLY_EXP, to); Under for (CPetSystem::TPetActorMap::iterator iter = to->GetPetSystem()->m_petActorMap.begin();iter != to->GetPetSystem()->m_petActorMap.end(); ++iter) if(CPetActor* petActor = iter->second) if(petActor->IsSummoned()) from->CreateFly(FLY_SP_MEDIUM, petActor->GetCharacter()) Open PetSystem.h private: TPetActorMap m_petActorMap; Change to public : TPetActorMap m_petActorMap;private: FLY_SP_MEDIUM Can change effects List Effects FLY_NONE, FLY_EXP, FLY_HP_MEDIUM, FLY_HP_BIG, FLY_SP_SMALL, FLY_SP_MEDIUM, FLY_SP_BIG, FLY_FIREWORK1, FLY_FIREWORK2, FLY_FIREWORK3, FLY_FIREWORK4, FLY_FIREWORK5, FLY_FIREWORK6, FLY_FIREWORK_CHRISTMAS, FLY_CHAIN_LIGHTNING, FLY_HP_SMALL, FLY_SKILL_MUYEONG, It is not my job. I just share .T4Ump <3 Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
d3s4st3r 40 Posted June 13, 2015 Share Posted June 13, 2015 Sadly doesn't work for me."char_battle.cpp:2508: error: expected `;' before '}' token " Link to comment Share on other sites More sharing options...
Alina 235 Posted June 13, 2015 Share Posted June 13, 2015 Please quote your char_battle.cpp (the part where the error line 2508 is located). Please post the whole function so we can determine what's your exact problem 1 Link to comment Share on other sites More sharing options...
d3s4st3r 40 Posted June 14, 2015 Share Posted June 14, 2015 (edited) -----------------------------Got the error, sometimes I'm wondering about my own stupidness! char_battle.cpp : PetSystem.h : Putty : char_battle.cpp: In member function 'void CHARACTER::Reward(bool)': char_battle.cpp:775: warning: suggest explicit braces to avoid ambiguous 'else' compile char_horse.cpp char_battle.cpp: In function 'void GiveExp(CHARACTER*, CHARACTER*, int)': char_battle.cpp:2504: error: 'struct CPetSystem::TPetActorMap' has not been declared char_battle.cpp:2504: error: expected `;' before 'iter' char_battle.cpp:2504: error: 'iter' was not declared in this scope char_battle.cpp:2504: error: invalid use of incomplete type 'struct CPetSystem' char.h:18: error: forward declaration of 'struct CPetSystem' char_battle.cpp:2506: error: 'CPetActor' was not declared in this scope char_battle.cpp:2506: error: 'petActor' was not declared in this scope char_battle.cpp:2510: error: expected `;' before '{' token char_battle.cpp:3657: error: expected `}' at end of input ../../../Extern/include/cryptopp/cryptlib.h: In member function 'bool CryptoPP::NameValuePairs::GetValue(const char*, T&) const [with T = std::string]': ../../../Extern/include/cryptopp/cryptlib.h:277: instantiated from here ../../../Extern/include/cryptopp/cryptlib.h:264: warning: dereferencing type-punned pointer will break strict-aliasing rules ../../../Extern/include/cryptopp/cryptlib.h: In member function 'bool CryptoPP::NameValuePairs::GetValue(const char*, T&) const [with T = int]': ../../../Extern/include/cryptopp/cryptlib.h:283: instantiated from here ../../../Extern/include/cryptopp/cryptlib.h:264: warning: dereferencing type-punned pointer will break strict-aliasing rules char_battle.cpp: At global scope: char_battle.cpp:2338: warning: 'void GiveExp(CHARACTER*, CHARACTER*, int)' defined but not used Makefile:119: recipe for target 'OBJDIR/char_battle.o' failed gmake[1]: *** [OBJDIR/char_battle.o] Error 1 gmake[1]: *** Waiting for unfinished jobs.... gmake[1]: Leaving directory '/root/workspace/Server/game/src' Makefile:60: recipe for target 'all' failed gmake: *** [all] Error 2 When I put "#include PetSystem.h" to the file "char_battle.cpp" the Error with " 'CPetActor' was not declared " is fixed. But the second 1 I don't know how to fix. Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
ekoo 8 Posted June 14, 2015 Share Posted June 14, 2015 (edited) you missing ; it end of code from->CreateFly(FLY_SP_MEDIUM, petActor->GetCharacter()) -----------------------------Got the error, sometimes I'm wondering about my own stupidness! Hidden Content add ; in end of code at line 2508 Edited June 14, 2015 by XmLX Link to comment Share on other sites More sharing options...
Endymion 323 Posted June 16, 2015 Share Posted June 16, 2015 How do you feel when stealing things from polish forum? 1 Link to comment Share on other sites More sharing options...
The Naid 120 Posted June 16, 2015 Share Posted June 16, 2015 (edited) Why you don't remove null pointer from CreateFly function? #C++_Noob(if player kill mob and kick from server same time, game crash) Edited June 16, 2015 by The Naid Link to comment Share on other sites More sharing options...
Endymion 323 Posted June 17, 2015 Share Posted June 17, 2015 Why you don't remove null pointer from CreateFly function? #C++_Noob(if player kill mob and kick from server same time, game crash) He don't remove null pointer because Inix forgot about it. Link to comment Share on other sites More sharing options...
Xalyx 3 Posted October 27, 2015 Share Posted October 27, 2015 help pls compile char_battle.cppchar_battle.cpp: In function 'void GiveExp(CHARACTER*, CHARACTER*, int)':char_battle.cpp:2512: error: 'struct CPetSystem::TPetActorMap' has not been declaredchar_battle.cpp:2512: error: expected `;' before 'iter'char_battle.cpp:2512: error: 'iter' was not declared in this scopechar_battle.cpp:2512: error: invalid use of incomplete type 'struct CPetSystem'char.h:18: error: forward declaration of 'struct CPetSystem'char_battle.cpp:2513: error: 'CPetActor' was not declared in this scopechar_battle.cpp:2513: error: 'petActor' was not declared in this scopegmake: *** [OBJDIR/char_battle.o] Error 1 Link to comment Share on other sites More sharing options...
kimameixede 6 Posted October 27, 2015 Share Posted October 27, 2015 works tankxxxx a lot Link to comment Share on other sites More sharing options...
Premium TAUMP 855 Posted January 18, 2018 Author Premium Share Posted January 18, 2018 On 16. 6. 2015 at 8:19 PM, Endymion said: How do you feel when stealing things from polish forum? I said " It is not my job. " so fuck you, dumbass 1 Link to comment Share on other sites More sharing options...
Recommended Posts