Hi!
What seems to be wrong with this code?
i does not seem to become more than 0! I play and I always get hubba1 again and again!
/Edward
What seems to be wrong with this code?
Code:
while(1)
{
If(s==0)
{
i=rand()*6;
If(i==0) { PlaySoundLocal(hubba1,1,0,0xC0);
sleep(GetSoundLen(hubba1)); }
If(i==1) { PlaySoundLocal(hubba2,1,0,0xC0);
sleep(GetSoundLen(hubba2)); }
If(i==2) { PlaySoundLocal(hubba3,1,0,0xC0);
sleep(GetSoundLen(hubba3)); }
If(i==3) { PlaySoundLocal(hubba4,1,0,0xC0);
sleep(GetSoundLen(hubba4)); }
If(i==4) { PlaySoundLocal(hubba1,1,0,0xC0);
PlaySoundLocal(hubba4,1,0,0xC0);
sleep(GetSoundLen(hubba4)); }
If(i==5) { PlaySoundLocal(hubba2,1,0,0xC0);
PlaySoundLocal(hubba3,1,0,0xC0);
sleep(GetSoundLen(hubba2)); }
}
Else if(s==1)
{
PlaySoundLocal(rayman1,1,0,0xC0);
sleep(GetSoundLen(rayman1)+1);
}
SetWallCel(name,s);
}i does not seem to become more than 0! I play and I always get hubba1 again and again!
/Edward
