One of my functions makes a call to a function near the beginning of it's code, and then towards the end it makes a call to a DIFFERENT function.
The first call works just fine, but the second call doesn't seem to be happening at all.
Here it is:
Code:
int scoreFunct(char c, char team, int gameA, int gameB){
while((c = getchar()) != EOF){
if ((c == 'S') || (c == 's')){
printFunct(scoreA,scoreB,c,team,gameA,gameB);
return(PRINT);
}
else if((c == 'B') || (c == 'b')){
if(scoreB < 30){
scoreB+=15;
}
else if(scoreB == 30){
scoreB+=10;
}
else if(scoreB == 40){
gameFunct(char c, char team, int gameA, int gameB);
return(GAME_B);
scoreB = scoreB - scoreB; //Since scoreB is a global variable, we need to reset it to 0 after the game to start the new score for next game
}
}
else if((c == 'A') || (c == 'a')){
if(scoreA < 30){
scoreA+=15;
}
else if(scoreA == 30){
scoreA+=10;
}
else if(scoreA == 40){
gameFunct(char c, char team, int gameA, int gameB);
return(GAME_A);
scoreA = scoreA - scoreA; //Since scoreA is a global variable, we need to reset it to 0 after the game to start the new score for next game
}
}
}
return(0);
}