[Compile Error] Latest update in Hercules 05-31-15

apuadofrancisco

New member
Messages
67
Points
0
Location
Philippines
Github
apuadofrancisco
Emulator
1>..srcmappc.c(186): error C2143: syntax error : missing ';' before 'type'
1>..srcmappc.c(187): error C2065: 'result' : undeclared identifier
1>..srcmappc.c(188): error C2065: 'result' : undeclared identifier
1>..srcmappc.c(190): error C2065: 'result' : undeclared identifier
1>..srcmappc.c(191): error C2065: 'result' : undeclared identifier
1>..srcmappc.c(192): error C2065: 'result' : undeclared identifier
1>..srcmappc.c(193): error C2065: 'result' : undeclared identifier


This is line 186 - 193
int result = pc->checkskill(sd, MO_CALLSPIRITS);
if ( min && result < min )
result = min;
else if ( sd->sc.data[sC_RAISINGDRAGON] )
result += sd->sc.data[sC_RAISINGDRAGON]->val1;
if ( result > MAX_SPIRITBALL )
result = MAX_SPIRITBALL;
return result;

Thanks!

 
it should be like this:

int pc_getmaxspiritball(struct map_session_data *sd, int min)
{
int result = pc->checkskill(sd, MO_CALLSPIRITS);
nullpo_ret(sd);
if ( min && result < min )
  result = min;
else if ( sd->sc.data[sC_RAISINGDRAGON] )
  result += sd->sc.data[sC_RAISINGDRAGON]->val1;
if ( result > MAX_SPIRITBALL )
  result = MAX_SPIRITBALL;
return result;
}
 
Back
Top