Guys, I'm having problems with this part of the code in src, the code is old and works in old emulators, but in the current emulator I'm having this error:
Erro (ativo) E0167 argumento do tipo "int" é incompatível com parâmetro do tipo "block_list *" map-server C:\Users\willd\Desktop\NEWPROJECT\emulador\src\map\script.cpp 8497
Erro C2664 'void map_clearflooritem(block_list *)': não é possível converter um argumento 1 de 'int' em 'block_list *' map-server C:\Users\willd\Desktop\NEWPROJECT\emulador\src\map\script.cpp 8497
Erro C2664 'void map_clearflooritem(block_list *)': não é possível converter um argumento 1 de 'int' em 'block_list *' map-server-generator C:\Users\willd\Desktop\NEWPROJECT\emulador\src\map\script.cpp 8497
Can anyone renew the code for the latest emulator? thanks
static int areaclean_sub(struct block_list *bl, va_list ap)
{
nullpo_retr(0, bl);
map_clearflooritem(bl->id);
return 0;
}
// areaclean "<map>",<x1>,<y1>{,<x2>,<y2>}
BUILDIN_FUNC(areaclean)
{
const char* map_ = script_getstr(st,2);
int x1 = script_getnum(st,3);
int y1 = script_getnum(st,4);
int x2 = script_hasdata(st,5) ? script_getnum(st,5) : script_getnum(st,3);
int y2 = script_hasdata(st,6) ? script_getnum(st,6) : script_getnum(st,4);
struct map_session_data* sd;
int m;
sd = map_id2sd(st->rid);
if( sd && !strcmp(map_,"this") )
m = sd->bl.m;
else
m = map_mapname2mapid(map_);
map_foreachinarea(areaclean_sub, m, x1, y1, x2, y2, BL_ITEM);
return 0;
}