Jump to content
  • 0
Sign in to follow this  
karazu

Anyone can help me with this please?

Question

battle.c: In function 'battle_check_target':
battle.c:6210: warning: suggest parentheses around '&&' within '||'



and this is the diff

 

 

 

 

+	if (src->type == BL_PC && target->type == BL_MOB)+	{+		TBL_MOB *mob_ = (TBL_MOB*)target;+		TBL_PC *sd_ = (TBL_PC*)src;+		if (sd_ && mob_)+		{+			if (mob_->noattackable == 1)+				return -1;+		}+	}+ 

all this one


script.c: In function 'buildin_bg_teamcreate':
script.c:18513: warning: implicit declaration of function 'mapindex_name2id'

 

 

 

 

 

+		// BG join+		+        BUILDIN_DEF(bg_teamjoin, "ii"),+		BUILDIN_DEF(bg_teamcreate, "s*"),+		// Dota+		BUILDIN_DEF(setmobnowalkable, "ii"),+		BUILDIN_DEF(setmobnoattackable, "ii"), 

 

 

 

Edited by karazu

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

if (src->type == BL_PC && target->type == BL_MOB)[
change into
if ( ( src->type == BL_PC ) && ( target->type == BL_MOB ) )
.

.

.

you didn't show the 2nd one but

change

mapindex_name2id

into

mapindex->name2id

 

... hmm ... so that's dota battleground script ...

I've heard rumors about it last year during my stay in rathena forum

of course it doesn't work in hercules

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

if (src->type == BL_PC && target->type == BL_MOB)[
change into
if ( ( src->type == BL_PC ) && ( target->type == BL_MOB ) )
.

.

.

you didn't show the 2nd one but

change

mapindex_name2id

into

mapindex->name2id

 

... hmm ... so that's dota battleground script ...

I've heard rumors about it last year during my stay in rathena forum

of course it doesn't work in hercules

yes this is..

 

I will test it now

Share this post


Link to post
Share on other sites
  • 0

Its here


battle.c: In function 'battle_check_target':
battle.c:6210: warning: suggest parentheses around '&&' within '||'

+				} else if( (sd->duel_group+				        && !((!battle_config.duel_allow_pvp && map->list[m].flag.pvp) || (!battle_config.duel_allow_gvg && map_flag_gvg(m))))+						|| (cell_pk_check(t_bl, s_bl, m) == true) 

 

Edited by karazu

Share this post


Link to post
Share on other sites
  • 0

 

 

+				} else if( (sd->duel_group+				        && !((!battle_config.duel_allow_pvp && map->list[m].flag.pvp) || (!battle_config.duel_allow_gvg && map_flag_gvg(m))))+						|| (cell_pk_check(t_bl, s_bl, m) == true) 

 

 

I actually see a missing closing bracket instead of suggesting a new parenthesis

 

how about showing a few lines above and below so that I can understand what it actually means

no idea what it is when just showing the conditions

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.