Jump to content
  • 0

Compiling Error When Apply Goddameit Reflect Damage Script


yagamiraito

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  06/28/16
  • Last Seen:  

Hello,

I'm manually put Goddameit Reflect "Reflection Damage" in my server. I'm using already-made server by someone, and for some reason it didn't leave any clue what revision I use. I hope it's not major role in this problem. Anyway I think I did good job add/replace line according to this patch. But there are tiny little change that make me bamboozled I learned script by comparison with working one but I don't understand any language at all.

 

Please take a look in this battle.c....

===================================================================
--- src/map/battle.c	(revision 17168)
+++ src/map/battle.c	(working copy)
@@ -4688,7 +4688,7 @@
 // Deals the same damage to targets in area. [pakpil]
 int battle_damage_area( struct block_list *bl, va_list ap) {
 	unsigned int tick;
-	int amotion, dmotion, damage;
+	int amotion, dmotion, damage, return_, damage_;
 	struct block_list *src;

 	nullpo_ret(bl);

According to this patch, I only just remove red one and add green one, and so I did. But, my battle.c has different line...

 

int battle_damage_area(struct block_list *bl, va_list ap) {
    unsigned int tick;
    int64 damage;    <--- This one is new line.
//    int amotion, dmotion;    <--- And this one doesn't have "damage" 
    int amotion, dmotion, damage, return_, damage_;
    struct block_list *src;

    nullpo_ret(bl);

And other lines doesn't change much, so it's easy...

 			status_fix_damage(src,bl,damage,0);
 		clif_damage(bl,bl,tick,amotion,dmotion,damage,1,ATK_BLOCK,0);
 		skill_additional_effect(src, bl, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick);
//Start Reflect Script
		if( (return_=((TBL_PC*)bl)->bonus.short_weapon_damage_return) > 0 )
		{
			damage_=damage*return_/100;
			if(damage_>0)
			{
				battle_delay_damage(tick, amotion,bl,src,0,CR_REFLECTSHIELD,0,damage_,ATK_DEF,0,true);
				clif_damage(src,src,tick,amotion,dmotion,damage_,1,ATK_BLOCK,0);
				skill_additional_effect(bl, src, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick);
			}
		}
//end Reflect script
 		map_freeblock_unlock();

And when I compiled it, it bring this error.

 

Error	1	error C2371: 'damage' : redefinition; different basic types	...rathena-master\src\map\battle.c	6967	1	map-server
Warning	2	warning C4244: '=' : conversion from 'int64' to 'int', possible loss of data	.......rathena-master\src\map\battle.c	6995	1	map-server
Error	3	error C2198: 'battle_delay_damage' : too few arguments for call	...rathena-master\src\map\battle.c	6998	1	map-server
Error	4	error C2198: 'clif_damage' : too few arguments for call	...rathena-master\src\map\battle.c	6999	1	map-server
	5	IntelliSense: too few arguments in function call	...rathena-master\src\map\battle.c	6998	89	map-server
	6	IntelliSense: argument of type "damage_lv" is incompatible with parameter of type "e_damage_type"	...rathena-master\src\map\battle.c	6999	56	map-server
	7	IntelliSense: too few arguments in function call	...\rathena-master\src\map\battle.c	6999	67	map-server

From this, I knew that that tiny change really mess it up. And I also uploaded my own version battle.h...... Please take a look. I would be grateful by any help I can get.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  387
  • Reputation:   60
  • Joined:  10/08/13
  • Last Seen:  

Please use rathena version from Jun 16 2013.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  06/28/16
  • Last Seen:  

Is it beyond repair? I mean, can it tweak here and there and then BAAM!!, no compiling error?

I did so much modification in this current version so to sudden change to other version is my last resort. And ummmm...... I don't want to abandon this patch. I hope someone that have knowledge on this language can help me on this one.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  06/28/16
  • Last Seen:  

bump

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