Jump to content
  • 0

Event bomberman - src error compile


darius

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  04/16/12
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

is this to remove drops from the mobs? If yes, better just add nodrop/noloot mapflag

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  04/16/12
  • Last Seen:  

No, it's to clear a certain area of mobs in event.

 

Captura de tela 2023-12-07 055847.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

use getunitarea then unitkill them all

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  04/16/12
  • Last Seen:  

in the src script?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

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