Eross Posted June 16, 2020 Posted June 16, 2020 Hi ! I just tried to randomize my happyhour today but it didnt worked out .. I wonder if my script is right or what ? help If the time is 1500 and weekdays it will randomly choose to go to happyhour3 or 2 OnHour03: OnHour15: if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3; if ( gettime(4) != 6 || gettime(4) != 0) goto rand(OnHappyHour3,OnHappyHour2); Quote
0 Kreustoo Posted June 16, 2020 Posted June 16, 2020 Hello, I'd have done something like this: OnHour03: OnHour15: if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3; if ( gettime(4) != 6 || gettime(4) != 0){ if(rand(1,2) == 1) goto OnHappyHour3; else goto OnHappyHour2; } (not tested) 1 Quote
0 Eross Posted June 16, 2020 Author Posted June 16, 2020 4 hours ago, Kreustoo said: Hello, I'd have done something like this: OnHour03: OnHour15: if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3; if ( gettime(4) != 6 || gettime(4) != 0){ if(rand(1,2) == 1) goto OnHappyHour3; else goto OnHappyHour2; } (not tested) I will try this sir thankyou !!! Quote
Question
Eross
Hi ! I just tried to randomize my happyhour today but it didnt worked out .. I wonder if my script is right or what ? help If the time is 1500 and weekdays it will randomly choose to go to happyhour3 or 2
OnHour03: OnHour15: if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3; if ( gettime(4) != 6 || gettime(4) != 0) goto rand(OnHappyHour3,OnHappyHour2);
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.