Hey, I know it's been a long time since I've been at the fourms, I might have asked this before, but I want to give the enemies additional sounds. Like have the soldier have more than one death sound.
but here is the prob;em: I did this:
// regular death
sound (self, CHAN_VOICE, "soldier/death1.wav", 1, ATTN_NORM);
else
sound (self, CHAN_VOICE, "soldier/death2.wav", 2, ATTN_NORM);
if (random() < 0.5)
army_die1 ();
else
army_cdie1 ();
};
but in the compiler, what's this:
compiling soldier.qc
in function army_die (line 221),
soldier.qc:237: error: Unknown value "else".
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: error: expected ;, found sound
also in soldier: Error in soldier.qc on line 286
line 286, this:
};
but here is the prob;em: I did this:
// regular death
sound (self, CHAN_VOICE, "soldier/death1.wav", 1, ATTN_NORM);
else
sound (self, CHAN_VOICE, "soldier/death2.wav", 2, ATTN_NORM);
if (random() < 0.5)
army_die1 ();
else
army_cdie1 ();
};
but in the compiler, what's this:
compiling soldier.qc
in function army_die (line 221),
soldier.qc:237: error: Unknown value "else".
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: warning: Expected punctuation
soldier.qc:237: error: expected ;, found sound
also in soldier: Error in soldier.qc on line 286
line 286, this:
};
Comment