Jump to content

Find Drop system bug.


Recommended Posts

Hello!

I try use the find drop by item system. But when i try search game is crashed..
so i started debugging and i fount if i print the char[] arg1 in server this is my word what i wrote in client. But next step is std::string item_name(arg1) and if i print item_name i got interesting text.. look the screenshot.

so i how can i solved this problem?
i read that i need to add the boost to Makefile but i don't know what to enter..

and when i commented some line and just add string to FindItemMonster(ch,"sword") now crash just after in the the FindItemMonster function and this is line what is problem
std::string name_monster(pMob->m_table.szLocaleName);

so maybe std::string there is something wrong with it 😕

Anyone have any ideas? Thanks and sorry my bad English 

spacer.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

if i change this line in cmd_general.ccp i got error when i build..

In file included from /usr/local/lib/gcc8/include/c++/algorithm:62,
                 from stdafx.h:19,
                 from cmd_general.cpp:1:
/usr/local/lib/gcc8/include/c++/bits/stl_algo.h: In instantiation of 'void std::replace(_FIter, _FIter, const _Tp&, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >; _Tp = char [2]]':
cmd_general.cpp:2756:59:   required from here
/usr/local/lib/gcc8/include/c++/bits/stl_algo.h:4375:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  if (*__first == __old_value)
      ~~~~~~~~~^~~~~~~~~~~~~~
/usr/local/lib/gcc8/include/c++/bits/stl_algo.h:4376:13: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    *__first = __new_value;
    ~~~~~~~~~^~~~~~~~~~~~~
gmake[1]: *** [Makefile:183: .obj/cmd_general.o] Error 1
gmake[1]: Leaving directory '/Srcs/Server/game/src'
gmake: *** [Makefile:111: all] Error 2

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.