–> Compiling file: act_comm.c <–
[- act_comm.c compiled OK -]
–> Compiling file: act_info.c <–
act_info.c: In function âdo_diagnoseâ: <—————————supposed to be do_diagnose but it's adding an accented a to both ends.
act_info.c:4233: warning: the address of âargâ will never be NULL <————— arg with accented a on both ends
[- act_info.c compiled OK -]
–> Compiling file: act_move.c <–
act_move.c: In function âdo_trainâ: <——————————supposed to be do_train but it's adding an accented a to both ends.
act_move.c:2710: error: lvalue required as left operand of assignment
act_move.c:2717: warning: assignment from incompatible pointer type
act_move.c:2725: warning: assignment from incompatible pointer type
make: *** [obj/act_move.o] Error 1
else if ( !str_cmp( arg1, "hp") && ch->max_hit < hpcap)
{
if ( ch->max_hit < 1 ) ch->max_hit = 1; /* Bug fix */
cost = 2 * (ch->max_hit - ch->pcdata->perm_con);
(int *) pAbility = &ch->max_hit; <———- Line 2710
pOutput = "hp";
}
else if ( !str_cmp( arg1, "hp") && ch->max_hit < hpcap)
{
if ( ch->max_hit < 1 ) ch->max_hit = 1; /* Bug fix */
cost = 2 * (ch->max_hit - ch->pcdata->perm_con);
(int *) pAbility = &ch->max_hit; <———- Line 2710
pOutput = "hp";
}
if(pIntAbil)
*pIntAbil += 1;
else if(pSrtAbil)
*pSrtAbil += 1;
sh_int* pSrtAbil = NULL;
int* pIntAbil = NULL;
–> Compiling file: act_move.c <–
act_move.c: In function `do_train':
act_move.c:2710: warning: use of cast expressions as lvalues is deprecated
act_move.c:2717: warning: assignment from incompatible pointer type
act_move.c:2725: warning: assignment from incompatible pointer type
[- act_move.c compiled OK -]
[- Rebuilding MUD executable: merc.exe -]
[- **********Compile Complete********** -]
else if ( !str_cmp( arg1, "mana") && ch->max_mana < manacap)
{
if ( ch->max_mana < 1 ) ch->max_mana = 1; /* Bug fix */
cost = 2 * (ch->max_mana - ch->pcdata->perm_wis);
pAbility = &ch->max_mana; <——————-2717 is here
pOutput = "mana";
}
else if ( !str_cmp( arg1, "move") && ch->max_move < movecap)
{
if ( ch->max_move < 1 ) ch->max_move = 1; /* Bug fix */
cost = 2 * (ch->max_move - ch->pcdata->perm_con);
pAbility = &ch->max_move; <——————————–2725 is here
pOutput = "move";
}
–> Compiling file: act_move.c <–
act_move.c: In function âdo_trainâ:
act_move.c:2709: warning: unused variable âpAbilityâ
act_move.c:2716: warning: assignment from incompatible pointer type
act_move.c:2724: warning: assignment from incompatible pointer type
act_move.c:2533: warning: âpAbilityâ may be used uninitialized in this function
[- act_move.c compiled OK -]
–> Compiling file: act_move.c <–
act_move.c: In function âdo_trainâ:
act_move.c:2709: warning: unused variable âpAbilityâ
act_move.c:2716: warning: assignment from incompatible pointer type
act_move.c:2724: warning: assignment from incompatible pointer type
act_move.c:2533: warning: âpAbilityâ may be used uninitialized in this function
[- act_move.c compiled OK -]
sh_int *pAbility;
sh_int* pAbility = NULL;
int* pIntAbil = NULL;
*pAbility += 1;
if(pAbility)
*pAbility += 1;
else if(pIntAbil)
*pIntAbil += 1;
line 2806 in merc.h is as follows
I didn't change this at all though so I am confused here. Any help is appreciated.