Raised This Month: $ Target: $400
 0% 

Getting random id


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sputnik53
Senior Member
Join Date: Jun 2005
Old 10-18-2007 , 06:25   Re: Getting random id
Reply With Quote #1

Code:
return iCT_num > 1 ? iPlayers[random(iCT_num)] : iPlayers[iCT_num-1]
Warning: Function get_randomCT_id should return a value on line #
Error: Function uses both "return" and "return <value>" on line #
Sputnik53 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-18-2007 , 06:31   Re: Getting random id
Reply With Quote #2

Code:
if( !iCT_num )             return -1

Then when you call the function, make sure to do nothing if it returns -1.
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode