Jump to content
  • 0

Find Drop system bug.


djmester

Question

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

Link to post

4 answers to this question

Recommended Posts

  • 0
  • VIP

did you try with this? std::replace(nume_item.begin(), nume_item.end(), "_", " ");
because i installed yesterday this system and it seems to work ok.

Link to post
  • 0

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 post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • 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.