Thanks for the feedback,
btw i got new error, can you help me with this one ?
mob.cpp: In function \u2018int mob_clone_spawn_market(map_session_data*, int16, int16, int16, char*, char*)\u2019:
mob.cpp:4052:72: error: no match for \u2018operator==\u2019 (operand types are \u2018std::map<short unsigned int, mob_db>::mapped_type {aka mob_db}\u2019 and \u2018long int\u2019)
ARR_FIND( MOB_CLONE_START, MOB_CLONE_END, mob_id, mob_db_data[mob_id] == NULL );
../common/db.hpp:947:8: note: in definition of macro \u2018ARR_FIND\u2019
if( __cmp ) \
^~~~~
In file included from mob.cpp:16:0:
../common/malloc.hpp:37:45: error: no match for \u2018operator=\u2019 (operand types are \u2018std::map<short unsigned int, mob_db>::mapped_type {aka mob_db}\u2019 and \u2018mob_db*\u2019)
# define aCalloc(m,n) _mcalloc(m,n,ALC_MARK)
^
mob.cpp:4056:45: note: in expansion of macro \u2018aCalloc\u2019
db = mob_db_data[mob_id] = (struct mob_db*)aCalloc( 1, sizeof(struct mob_db) );
^~~~~~~
In file included from mob.cpp:4:0:
mob.hpp:164:8: note: candidate: mob_db& mob_db::operator=(const mob_db&)
struct mob_db {
^~~~~~
mob.hpp:164:8: note: no known conversion for argument 1 from \u2018mob_db*\u2019 to \u2018const mob_db&\u2019
mob.hpp:164:8: note: candidate: mob_db& mob_db::operator=(mob_db&&)
mob.hpp:164:8: note: no known conversion for argument 1 from \u2018mob_db*\u2019 to \u2018mob_db&&\u2019
mob.cpp:4064:18: error: invalid conversion from \u2018int\u2019 to \u2018e_mode\u2019 [-fpermissive]
mstatus->mode = 0;
AND THIS IS THE SRC FOR MOB.C
// Market Clone [AnnieRuru/Dastgir]
int mob_clone_spawn_market( struct map_session_data *sd, int16 m, int16 x, int16 y, char market_title[], char market_msg[] ) { //Copy of mob_clone_spawn with some modification.
int mob_id;
struct mob_data *md;
struct mob_db* db;
struct status_data *mstatus;
struct chat_data* cd;
ARR_FIND( MOB_CLONE_START, MOB_CLONE_END, mob_id, mob_db_data[mob_id] == NULL );
if ( mob_id >= MOB_CLONE_END )
return 0;
db = mob_db_data[mob_id]=(struct mob_db*)aCalloc(1, sizeof(struct mob_db));
mstatus = &db->status;
strcpy( db->sprite, sd->status.name, NAME_LENGTH );
strcpy( db->name, sd->status.name, NAME_LENGTH );
strcpy( db->jname, sd->status.name, NAME_LENGTH );
db->lv = status_get_lv(&sd->bl);
memcpy( mstatus, &sd->base_status, sizeof( struct status_data ) );
mstatus->rhw.atk = mstatus->rhw.atk2 = mstatus->lhw.atk = mstatus->lhw.atk2 = mstatus->hp = mstatus->max_hp = mstatus->sp = mstatus->max_sp = 1;
mstatus->mode = 0;
memcpy( &db->vd, &sd->vd, sizeof( struct view_data ) );
db->base_exp = db->job_exp = db->range2 = db->range3 = 1;
db->option = 0;
md = mob_once_spawn_sub( &sd->bl, m, x, y, sd->status.name, mob_id, "", SZ_SMALL, AI_NONE );
if ( !md )
return 0;
md->special_state.clone = 1;
mob_spawn(md);
unit_setdir( &md->bl, unit_getdir(&sd->bl) );
cd = chat_createchat( &md->bl, market_title, "", 1, false, 0, "", 0, 1, MAX_LEVEL );
if ( !cd )
return 0;
md->market_chat_id = cd->bl.id;
safestrncpy( md->market_message, market_msg, CHAT_SIZE_MAX );
clif_dispchat( cd, 0 );
if ( sd->vd.dead_sit == 2 )
clif_sitting( &md->bl );
return md->bl.id;
im using latest rathena
Ty.