The online racing simulator
hi guys i have a percent button and it counts but...
my percent button could like alot of numbers like where is should be 1% its at like 637% and it doesnt stop at 100 is goes on till the 100's i havnt drove till i get bonus that if i get bonus.

i was getting bonus before though so that should be a problem.

but without me boring you guys/gals anymore i was hoping you would have suggestions on how to make my bonus go up to 1% at right time and and get to 100% as player collect bonus.

thanks for any help you guys/gals may give me.


Shane
#2 - amp88
Your post is very badly formatted. I can hardly make any sense of it. You need to sit down, take a deep breath and re-type it so that it makes sense to other people. Try reading it out loud to see how it sounds. Also, with a question about programming you need to provide more details. For example, where is the percentage value coming from? What are you using to calculate it?
#3 - PoVo
A bit of the code would be nice , if it's from the LC Cruise insim, then you need to divide the Bonus, by 500, to display it in a button
the code is from lc insim but what do you mean but divide bonus which one is the bonus lol
decimal SpeedMS = (decimal) (((MCI.Info[i].Speed / 32768f) * 100f) / 2);

decimal Speed = (decimal)((MCI.Info[i].Speed * (100f / 32768f)) * 3.6f);
decimal ConvSpeed = (decimal)(Speed * 25 / 1000);

well thats the speed. not the bonus. lol!
where do i find the bonus haha
#8 - PoVo
Find the CheckUser time place, where the actual Button is created, and devide the C.BonusSOMETHING by a hundred.

eg (C.Bonus / 500)
hi ther is only 1 c.bonus in my code and that done beside !insim off

would is be current distanceSincePit thats up where the actuly button is created
#10 - PoVo
Yes thats the one. When it's displayed on the button, the code should look something like this:

"Bonus: " + C.DistanceSincePit

Change that to:

"Bonus: " + C.DistanceSincePit / 500

That will display it like this: Bonus: 10%

You can also use:

"Bonus: " + C.DistanceSincePit / 500d

This will display the bonus with decimals (hence the 'd')

e.g Bonus: 10.11%

Good look with your application!

FGED GREDG RDFGDR GSFDG