Rand returning Int

BlitzMax Forums/BlitzMax Programming/Rand returning Int

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You get an error with what code?

I can do this :-

Global i:Long = Rand(0,100)

with no problems.

Explicit casting is performed by this kind of syntax (brackets are unneccessary but I always use them)

Global x:Int
Global y:Float

y = 10.0
x = Int(y) ' Here's the cast to Int