The Dink Network

Reply to Re: random talking issue

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
April 3rd 2011, 09:33 AM
dinkdead.gif
int &rndme random(4,0)

should be
int &rndme = random(4,0);


I always forget exactly how random() works but I think random(4, 0) will return 0,1,2, or 3, not 4.
Random number between 0 (inclusive) and 0+4 (ie 4 - but not inclusive).

And don't worry we don't bite people's heads off! Usually