If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.
Post a reply to the thread: VB.Net - Random integers turning into random floats? why?
Click here to log in
What is the number after 87?
You may choose an icon for your message from this list
Will turn www.example.com into [URL]http://www.example.com[/URL].
You may rate this thread from 1-star (Terrible) to 5-stars (Excellent) if you wish to do so.
VB.Net - Random integers turning into random floats? why? Sub randomsub(ByRef num, ByVal max) num = Rnd() * max End Sub That is my code, both num and max are integers. Before it worked fine, but then I added an extra option to choose between additoon/subtraction/multiplication and i copied and pasted and changed the operator( + - x). I want it to only randomize full integers not decimal point floats. WHY IS IT GIVING ME THIS STUFF NOW? http://img266.imageshack.us/img266/1913/rgesawfew.jpg well this is in vb.net, not psuedocode, also max is defined as an integer same as num because i want they to be integers. I can easily change max to tempnum and it makes no difference. FIXED! Its okay... i just reverted back to my old programming style and made everything a global and for SOME WEIRD REASON it works...
VB.Net - Random integers turning into random floats? why?
Forum Rules