Ok now i've tryed :
Code:
#include <stdio.h>
#define OLIE 10
#define FLIP_KICK 50
#define BIG_JUMP 30
#define SWITCH 40
int b=0;
then i add to it:
Code:
int curb()
{
int z;
clrscr();
printf("Were coming up to a waxed curb, what do you want to do, make it fast\n");
printf("1. do an olie over it.\n");
printf("2. do a flip kick onto it.\n");
printf("3. do a big jump over it.\n");
printf("4. do a switch onto it.\n");
printf("5. exit\n");
scanf("%d", &z);
if ( z == 1 )
b + 10;
else if (z == 2)
b + 50;
else if (z == 3)
b + 30;
else if (z == 4)
b + 40;
else
exit();
printf("%d", b);
printf(" point's\n");
return z;
}
but when i output the value of b it's zero. What's up?