The Daily Click ::. Forums ::. Klik Coding Help ::. Quick question.
 

Post Reply  Post Oekaki 
 

Posted By Message

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  372

VIP MemberCardboard BoxThe Cake is a Lie
29th March, 2011 at 22:32:19 -

I'm working on a fairly simple screen saver and I'm storing a bunch of the data in alterable values to make things a bit easier. Here's the problem:

I need to divide a circumference by 100, and I need to store that in an alterable value. My set circumference is 350, and 350 / 100 = 3.5. The problem is that alterable values, as far as I know, can't contain decimals, so I can't store 3.5 in an alterable value. Why is that, and how can I get around it? But please, no counters.

Thanks in advance!

 
An old and washed up once-kid

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
29th March, 2011 at 22:37:47 -

They can if you force it to use decimals. Use circumference/100.0 and it should work. Having to use decimals in the expression makes it give decimals in the result.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
29th March, 2011 at 22:46:46 -

Ok, I'm gonna hi-jack this thread for a question. What is the airspeed velocity of an unladen swallow?

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  372

VIP MemberCardboard BoxThe Cake is a Lie
29th March, 2011 at 23:08:18 -

@Jon: Thanks, man. I'll definitely try that method. I just figured out another way: Alterable Strings and then converting them to numbers. It works, but it's overly complicated.

@Phredreeke: Faster than an African/European Velociraptor Crumpet. On fire.

 
An old and washed up once-kid
   

Post Reply



 



Advertisement

Worth A Click