hey im making an ascii fighting game and i cant understand why this gives errors
Code:
attack( int hp, int att, int def, int spd, int power, int cash, int wins, int loses, int awake, int battle_num, int enemyatt, int enemydef, int enemyspd, int enemyhp ){
int blowtype;
char blow[10];
int attacker;
char aattacker[10];
int attacked;
char aattacked[10];
int place;
char pplace[10];
int hit = att - ( rand() % 30 );
int hhit = enemyatt - ( rand() % 30 );
srand( time( NULL ) );
attacker = rand() % 2;
blowtype = 1 + ( rand() % 3 );
place = 1 + ( rand() % 3 );
switch( blowtype ){
case 1: blow = 'punch';
break;
case 2: blow = 'kick';
break;
case 3: blow = 'slap';
break;
}
switch( place ){
case 1: pplace = 'head';
break;
case 2: pplace = 'stomach';
break;
case 3: pplace = 'balls';
}
if( attacker == 0 ){
attacked = 1;
aattacked = 'Laymow';
aattacker = 'You';
}else{
attacked = 0;
aattacked = 'You';
aattacker = 'Laymow';
}
printf("\n%s %s %s in the %s for %d hp...", aattacker, blow, aattacked, pplace, hit );
}
thx