Anyone can help me with this please?

karazu

New member
Messages
1,115
Points
0
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'

Code:
+		// BG join+		+        BUILDIN_DEF(bg_teamjoin, "ii"),+		BUILDIN_DEF(bg_teamcreate, "s*"),+		// Dota+		BUILDIN_DEF(setmobnowalkable, "ii"),+		BUILDIN_DEF(setmobnoattackable, "ii"), 
 
 
Last edited by a moderator:
if (src->type == BL_PC && target->type == BL_MOB)[change into
Code:
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

 
Last edited by a moderator:
if (src->type == BL_PC && target->type == BL_MOB)[change into
Code:
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

 
Its here


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


Code:
+				} 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) 

 
Last edited by a moderator:
+ } 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

 
Back
Top