fictionx Posted November 8, 2015 Posted November 8, 2015 (edited) I have an error when i try to install this code. // Returns the count of all the monsters on the specified map with the given monster id. // mobcount2 <map>,<mob id>; static int buildin_mobcount2_sub(struct block_list *bl,va_list ap) { int class_=va_arg(ap,int); struct mob_data *md = ((struct mob_data *)bl); if(md->class_ == class_ && md->status.hp > 0) return 1; return 0; } BUILDIN_FUNC(mobcount2) { const char *mapname; int class_,m; mapname=script_getstr(st,2); class_=script_getnum(st,3); if(!mobdb_checkid(class_)) { script_pushint(st,-1); return 0; } if((m = map_mapname2mapid(mapname)) < 0) { script_pushint(st,-1); return 0; } if(map[m].flag.src4instance && map[m].instance_id == 0 && st->instance_id && (m = instance_mapid2imapid(m, st->instance_id)) < 0) { script_pushint(st,-1); return 0; } script_pushint(st,map_foreachinmap(buildin_mobcount2_sub,m,BL_MOB,class_)); return 0; } this is the error script.c: In function ‘buildin_mobcount2_sub’: script.c:4826: error: ‘struct mob_data’ has no member named ‘class_’ script.c: In function ‘buildin_mobcount2’: script.c:4846: error: ‘struct map_flag’ has no member named ‘src4instance’ script.c:4846: error: ‘struct script_state’ has no member named ‘instance_id’ script.c:4846: warning: implicit declaration of function ‘instance_mapid2imapid’ script.c:4846: error: ‘struct script_state’ has no member named ‘instance_id’ bump Edited November 7, 2015 by fictionx Quote
Question
fictionx
I have an error when i try to install this code.
this is the error
bump
Edited by fictionx0 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.