Bizzy 101 Posted May 7, 2021 Share Posted May 7, 2021 (edited) Hello, when i compiling the source i become this error. i used freebsd 12.1 and i dont understand the problem https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif i try NULL to nullptr but still same error when i try NULL to 0 gamecore Pls help me or say me how i can fix that. Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted May 7, 2021 Premium Share Posted May 7, 2021 std::vector <LPITEM> item_gets; 1 Link to comment Share on other sites More sharing options...
Bizzy 101 Posted May 7, 2021 Author Share Posted May 7, 2021 Thx but the error with NULL is still same 1 Link to comment Share on other sites More sharing options...
DrTurk 133 Posted May 7, 2021 Share Posted May 7, 2021 show us the function Link to comment Share on other sites More sharing options...
Bizzy 101 Posted May 7, 2021 Author Share Posted May 7, 2021 struct FCFight { LPCHARACTER pkLeaver; DWORD stateType; FCombatFight(LPCHARACTER ch, DWORD state) : pkLeaver(ch), stateType(state) {} void operator() (LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { LPCHARACTER ch = static_cast<LPCHARACTER>(ent); if (ch && ch->IsPC()) { switch (stateType) { case C_FIGHT_ADD: { TargetInfo * pInfo = CTargetManager::instance().GetTargetInfo(ch->GetPlayerID(), COMBAT_FIGHT_INDEX, pkLeaver->GetVID()); if (!pInfo) CTargetManager::Instance().CreateTarget(ch->GetPlayerID(), C_ZONE_INDEX_TARGET, pkLeaver->GetName(), C_FIGHT_INDEX,pkLeaver->GetVID(), NULL, ch->GetMapIndex(), "1"); } break; case C_FIGHT_REMOVE: CTargetManager::instance().DeleteTarget(ch->GetPlayerID(), C_FIGHT_INDEX, pkLeaver->GetName()); break; } } } } }; Link to comment Share on other sites More sharing options...
Developer Deliris 405 Posted May 7, 2021 Developer Share Posted May 7, 2021 15 minutes ago, Bizzy said: struct FCFight { LPCHARACTER pkLeaver; DWORD stateType; FCombatFight(LPCHARACTER ch, DWORD state) : pkLeaver(ch), stateType(state) {} void operator() (LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { LPCHARACTER ch = static_cast<LPCHARACTER>(ent); if (ch && ch->IsPC()) { switch (stateType) { case C_FIGHT_ADD: { TargetInfo * pInfo = CTargetManager::instance().GetTargetInfo(ch->GetPlayerID(), COMBAT_FIGHT_INDEX, pkLeaver->GetVID()); if (!pInfo) CTargetManager::Instance().CreateTarget(ch->GetPlayerID(), C_ZONE_INDEX_TARGET, pkLeaver->GetName(), C_FIGHT_INDEX,pkLeaver->GetVID(), NULL, ch->GetMapIndex(), "1"); } break; case C_FIGHT_REMOVE: CTargetManager::instance().DeleteTarget(ch->GetPlayerID(), C_FIGHT_INDEX, pkLeaver->GetName()); break; } } } } }; When he told you to show us the function...he meant the function that generates the error....... The fix that @WeedHexprovided should work, If I remember correctly there are multiple occurrences in char_item.cpp 1 r Link to comment Share on other sites More sharing options...
Bizzy 101 Posted May 7, 2021 Author Share Posted May 7, 2021 yes @WeedHex fixed std::vector <LPITEM> item_gets NULL; to std::vector <LPITEM> item_gets; okay CTargetManager::Instance().CreateTarget(ch->GetPlayerID(), C_ZONE_INDEX_TARGET, pkLeaver->GetName(), C_FIGHT_INDEX,pkLeaver->GetVID(), NULL, ch->GetMapIndex(), "1"); here is the error NULL Link to comment Share on other sites More sharing options...
DrTurk 133 Posted May 7, 2021 Share Posted May 7, 2021 .... Link to comment Share on other sites More sharing options...
Bizzy 101 Posted May 8, 2021 Author Share Posted May 8, 2021 i dont understand what are happening?? DrTurk ..... what is this give a normal answer Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now