Reply to Re: Mkbul's code error thread
If you don't have an account, just leave the password field blank.
Did you mean to get rid of the loop? That now has a 1 in 10 chance of playing the sound, and it will only play it once even then. The minute wait seems a bit pointless too if all that happens afterwards is disabling the touch.
Also, there's no need for the &hertz thing because playsound has a built-in random speed setting. Just do this: playsound(35, 15000, 3000, 0, 0);
Tell us what you want to do and maybe we can advise better! Like how long is the sound and how often should it play? In your first loop you're checking a 1 in 10 chance 100 times a second, that will play the sound very very often
Also, there's no need for the &hertz thing because playsound has a built-in random speed setting. Just do this: playsound(35, 15000, 3000, 0, 0);
Tell us what you want to do and maybe we can advise better! Like how long is the sound and how often should it play? In your first loop you're checking a 1 in 10 chance 100 times a second, that will play the sound very very often