Jump to content
Sign in to follow this  

Math problem using progressbar

Recommended Posts


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)
$Pct = $Pct / $Count * 100
ProgressSet($Pct, $msg & ' | ' & Round($pct)) ;Set progress bar

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 :)



LOL found the solution my self :D

$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 :)



Edited by Rex

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...