|
Post by steamhottt on Nov 1, 2020 4:33:34 GMT
The R variable does act not as it is described or the Label does not show it right ?
Hello Nic, I encountered a problem with the R variable using Streambyter.
Base on the description and the examples you gave us, RN would be random number between 0 and N, like R1 would be 0 or 1; R2 would be one of 0, 1 and 2.
In the following script, when the slider q0 is moved, the left label should display 0 or 1, like 50/50. But it only shows 0. Only when R1 is changed to R2, the label displays between 0 and 1.
In short, RN is only between 0 and N-1 in this situation.
Is it a bug, or I just get it wrong? Need your help Nic. Thanks.
Script enclosed:
if load set include factory standard_includes set q0 xxx 0 9 +s set slider_display 1 end
if control_q0_moved ass I0 = R1 set lb0 I0 +D end
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 1, 2020 9:44:22 GMT
Hi steamhottt , You are correct. The documentation is wrong. The value specified after the R will return a value in the range of 0 to N-1. Examples: R2 -> 0, 1 R3 -> 0, 1, 2 R10 -> 0-15 R80 -> 0-127Regards, Nic.
|
|