I want to makea change insrcbut when I gotocompileerror,wantedhelpto reshapeto modificationleavingher withthe same function
gcc -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -fno-strict-aliasing -DHAVE_SETRLIMIT -DHAVE_STRNLEN -Wno-unused -Wno-parentheses -DHAVE_MONOTONIC_CLOCK -I../../3rdparty/mt19937ar -I/usr/include/mysql -I../common -I/usr/include -c -o obj_sql/battle.o battle.c battle.c: In function ‘battle_check_target’: battle.c:3433: error: ‘tsd’ undeclared (first use in this function) battle.c:3433: error: (Each undeclared identifier is reported only once battle.c:3433: error: for each function it appears in.) make[1]: *** [obj_sql/battle.o] Error 1 make[1]: Leaving directory `/home/emulador/src/map' make: *** [map_sql] Error 2 You have new mail in /var/spool/mail/root -bash-4.1#
src/map/battle.c
if( t_bl == s_bl ) break;
sd = BL_CAST(BL_PC, t_bl);
if( sd->state.monster_ignore && flag&BCT_ENEMY )
return 0; // Global inminuty only to Attacks
+ if(s_bl->type == BL_PC)
+ tsd = BL_CAST(BL_PC, s_bl);
+ if(s_bl->type == BL_PC && map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKPVP) && flag&BCT_ENEMY && map_getcell(tsd->bl.m,tsd->bl.x,tsd->bl.y,CELL_CHKPVP))
+ state |= BCT_ENEMY; //PvP enemy.
if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma )
state |= BCT_ENEMY; // Characters with bad karma may fight amongst them
if( sd->state.killable ) {
state |= BCT_ENEMY; // Everything can kill it
strip_enemy = 0;
}
Question
Scofield
I want to make a change in src but when I go to compile error, wanted help to reshape to modification leaving her with the same function
gcc -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -fno-strict-aliasing -DHAVE_SETRLIMIT -DHAVE_STRNLEN -Wno-unused -Wno-parentheses -DHAVE_MONOTONIC_CLOCK -I../../3rdparty/mt19937ar -I/usr/include/mysql -I../common -I/usr/include -c -o obj_sql/battle.o battle.c
battle.c: In function ‘battle_check_target’:
battle.c:3433: error: ‘tsd’ undeclared (first use in this function)
battle.c:3433: error: (Each undeclared identifier is reported only once
battle.c:3433: error: for each function it appears in.)
make[1]: *** [obj_sql/battle.o] Error 1
make[1]: Leaving directory `/home/emulador/src/map'
make: *** [map_sql] Error 2
You have new mail in /var/spool/mail/root
-bash-4.1#
src/map/battle.c
Edited by cumbe11Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.