Originally Posted By: Tonyjack221
if i click mouse_left The sound repeated in this code :

if((mouse_left==1)&(my.skill6==0))
{
snd_play(SND_FINAL, 100, 0);
}

i want to play the sound Each time you press mouse_left with out repeated


first obvious problem here
Code:
&  Bitwise AND, can be used to reset certains bits in a variable. 

	if((mouse_left==1) & (my.skill6==0))
	{
		snd_play(SND_FINAL, 100, 0);
	}

your not comparing your altering

&& True if the expressions left and right of the operator are both true. 

	if((mouse_left==1) && (my.skill6==0))
	{
		snd_play(SND_FINAL, 100, 0);
	}



and another thing mouse_left==1 can be true for quite a while
oh i see others have catered to the repetition already

Last edited by Wjbender; 04/14/12 09:00.

Compulsive compiler