Page 2 of 2
Re: integer
Posted: Thu Jan 27, 2022 6:20 pm
by dunbarx
Set a breakpoint at the line:
Code: Select all
if _overDriveBonus is an integer then #do something
Step through the handler and see what the value of the variable "_overDriveBonus" is at that point.
Craig
Re: integer
Posted: Thu Jan 27, 2022 6:33 pm
by Klaus
Samuele wrote: Thu Jan 27, 2022 6:19 pm
alright, i figured i'd share only the inherent parts of my stack:
OverDriveBonus.zip
Is asking for a LITTLE info (where to click and where to look etc.) too much?
And I can't even SEE the progressbar!?

Re: integer
Posted: Thu Jan 27, 2022 6:36 pm
by Klaus
OK, I found a way through your stack...
The progressbar works as expected!
Code: Select all
on UpdateOverDriveClickBonus
add 1 to _sessionClicks
set the thumbPosition of scrollbar "ProgressOverDrive" to _sessionClicks
...
But you reset it to 0 immediately after that!?
And every time when clicked!?
Code: Select all
on ShowBetterOverDrive
## _overDriveBonus IS an INTEGER all the time!
if _overDriveBonus is an integer then
set the thumbPosition of scrollbar "ProgressOverDrive" to 0
...
So you shoot your own foot, gratulazione!

Re: integer
Posted: Thu Jan 27, 2022 6:44 pm
by Samuele
Klaus wrote: Thu Jan 27, 2022 6:36 pm
## _overDriveBonus IS an INTEGER all the time!
you're right!!! when i realized it i made two functions, one with return trunc and the other a normal return, and that fixed my first problem.
Re: integer
Posted: Thu Jan 27, 2022 6:52 pm
by Samuele
the second problem is: how can i reset the progress bar and restart the progress (a solution would be to put 0 into _sessionClikcs but the problem is that if i do that then the bonus will remain always X1)
any other ideas?
Thanks!
Re: integer
Posted: Thu Jan 27, 2022 7:10 pm
by Samuele
Thank you for your help i solved the progress bar problem B"H by setting it to (_sessionClicks - _ClicksAlreadyCounted) and i added 20 to _ClicksAlreadyCounted where i set the progress bar to 0.
Re: integer
Posted: Thu Jan 27, 2022 7:22 pm
by dunbarx
Samuele.
This is always how these things play out, invariably operator malfunction. But that is how we all learn, the hard way.
Craig