Something odd is going on

BlitzPlus Forums/BlitzPlus Programming/Something odd is going on

Most likely my brain is malfunctioning here, but why doesn't this work properly?
Graphics 640,480,0,2
Global total=100
Global value=0
Global wid=80
SetBuffer BackBuffer()

Repeat
Cls

Color 180,180,180
Rect 100,100,wid,16
Color 255,255,255
Rect 101,101,value/total*(wid-2),14

value=value+1
Flip
If KeyDown(1) End
Forever


My intention is for the progress bar to slowly advance so it's bigger. I wrote this so it'd be easier than posting my entire code for what I'm working on. For some reason it only counts 100's in its updating. Run it and you'll see what I mean.

You are using all integer values. 0/100, 1/100, 2/100, ... 99/100 are all equal to 0.
Then 100/100, ... 199/100 are equal to 1, etc.

Use float variables, e.g. value#.