1. possible bug in rand_range function

I've just created my first real simple game in Euphoria. In the process, I may have found a bug in the rand_range function. When I first start playing the game, it picks random numbers like I expect. At a certain point, it just starts picking the number 1 for the wrest of the game. Is this a bug or am I missing something? The source code for the game is at http://ormondbeachishome.com/killthelobbiests.ex.

new topic     » topic index » view message » categorize

2. Re: possible bug in rand_range function

tiger0581 said...

I've just created my first real simple game in Euphoria. In the process, I may have found a bug in the rand_range function. When I first start playing the game, it picks random numbers like I expect. At a certain point, it just starts picking the number 1 for the wrest of the game. Is this a bug or am I missing something? The source code for the game is at http://ormondbeachishome.com/killthelobbiests.ex.

Hi

Having a very quick scan through the code, isn't this what's supposed to happen - as you reduce the hitmen count, so the range fro random numbers becomes les, until you pick between the range 1 and 1?

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: possible bug in rand_range function

Oh my god! I feel stupid. Thanks.

new topic     » goto parent     » topic index » view message » categorize

4. Re: possible bug in rand_range function

Heh, thats ok, I've done that so many times I've lost count - 1

Chris

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu