RandExcept (rifddle)

BlitzMax Forums/BlitzMax Beginners Area/RandExcept (rifddle)

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.

Function RandExcept% (v1%,v2%,ex%)
 if v1=v2 and ex=v1 then RuntimeError ("Use some useful parameters!")
 local res%
 repeat
    res=Rand(v1,v2)
 until res<>ex
 return res
End Function