@m4zuper bass premium board
windows 11 installed
I'm sure I did everything
Sometimes execute, sometimes skip
-
Can someone provide me with an example or explain how to execute a section of the code sometimes, but sometimes skip it?
Thanks
-
anyone?
-
One ugly solution is to do this,
Generate random number depending on how often you want to execute it. If you want 50% execute, make random number 0 to 1 and if 0 function.
If you want 25% chance of execute generate random number 0-3
If variable == 3 execute function
else do nothingVariable_Number == Random Number 1-4
If Variable_Number == 4{
Function
}else
{
}This should execute function 1/4 of the times.
-
Thanks for this, Is there no easier way?
Cheers