Hi all,
I am making a basic football managment game and i am struggling to store values in the league table, heres what i have so far.
its not the whole program just the part where i need to add up values.
Code:
if (team1 > team2) // if team 1 wins
{
wont1++;
gfort1[1] = + team1;
ggainst1[1] = + team2;
pointst1 = + 3;
}
if (team2 > team1) // if team 2 wins
{
wont2++;
gfort2[1] = + team2;
ggainst2[1] = + team1;
pointst2 = + 3;
}
if (team1 == team2) // if a draw
{
gfort1[1] + team1;
ggainst1[1] + team2;
gfort2[1] + team2;
ggainst2[1] + team1;
pointst1 = + 1;
pointst2 = + 1;
}
The variables team 1 & 2 are random numbers.
This might be absolute crap, but what i want to do is everytime team 1 or 2 wins i want to add 3 to their points or 1 point if they draw.
Also gfor1 & 2 need to store values for goals scored
And ggainst1 & 2 need to store values for goals against
Cheers guys
[code][/code]tagged by Salem