Rex Posted April 23, 2015 Posted April 23, 2015 (edited) Hi I'm terrible to math So I have a problem, i'm using a progressbar in my script to keep track. But some how my math makes it go way over the 100% My code is. Func _progress($msg) Sleep(500) $Pct = $Pct / $Count * 100 ProgressSet($Pct, $msg & ' | ' & Round($pct)) ;Set progress bar EndFunc Current I call the function 14 times, and therefor i have set the $count to 14, the $Pct is set to 1 at start up. What am I doing wrong, took the math formula from a download progressbar where the $pct was current dl size and $count was the filesize in total Hope that some on can help me Cheers /Rex LOL found the solution my self $i = 1 $i = $i + 1 at the end of the function did the trix. All i had to do was post in here, and the solution came to me Cheers /Rex Edited April 23, 2015 by Rex
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now