Takuyakii Posted September 25, 2019 Group: Members Topic Count: 41 Topics Per Day: 0.02 Content Count: 215 Reputation: 11 Joined: 08/30/19 Last Seen: March 6 Share Posted September 25, 2019 Hello can some help me , im trying to use this on latest git topic: im having an error atcommand.cpp: In function \u2018int atcommand_market(int, map_session_data*, const char*, const char*)\u2019: atcommand.cpp:10086:28: error: \u2018class std::unordered_map<short int, int>\u2019 has no member named \u2018town\u2019 if ( !map[sd->bl.m].flag.town ) { ^~~~ make[1]: *** [Makefile:84: obj/atcommand.o] Error 1 make[1]: Leaving directory '/root/trunk/src/map' make: *** [Makefile:50: map] Error 2 Quote Link to comment Share on other sites More sharing options...
0 Radian Posted September 25, 2019 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted September 25, 2019 @Takuyakii replace !map[sd->bl.m].flag.town with !mapdata->flag[MF_TOWN] 1 Quote Link to comment Share on other sites More sharing options...
0 Takuyakii Posted September 25, 2019 Group: Members Topic Count: 41 Topics Per Day: 0.02 Content Count: 215 Reputation: 11 Joined: 08/30/19 Last Seen: March 6 Author Share Posted September 25, 2019 (edited) 14 hours ago, Radian said: @Takuyakii replace !map[sd->bl.m].flag.town with !mapdata->flag[MF_TOWN] 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. Edited September 25, 2019 by Takuyakii Quote Link to comment Share on other sites More sharing options...
Question
Takuyakii
Hello can some help me , im trying to use this on latest git
topic:
im having an error
atcommand.cpp: In function \u2018int atcommand_market(int, map_session_data*, const char*, const char*)\u2019:
atcommand.cpp:10086:28: error: \u2018class std::unordered_map<short int, int>\u2019 has no member named \u2018town\u2019
if ( !map[sd->bl.m].flag.town ) {
^~~~
make[1]: *** [Makefile:84: obj/atcommand.o] Error 1
make[1]: Leaving directory '/root/trunk/src/map'
make: *** [Makefile:50: map] Error 2
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.