Raised This Month: $ Target: $400
 0% 

Random Numbers


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
The Specialist
BANNED
Join Date: Nov 2006
Old 11-11-2006 , 20:59   Re: Random Numbers
Reply With Quote #3

well the idea was that if the random cvars is 0 , which is the default , then not to run that function at all . other wise it will generate a random number between 0 and 200 the other cvar. so first it checks to see if there using the random function cvar , if they are and the number is not 0 , then it will generate a number. i found the problem that made it crash .
Code:
// Random number generator public random_jam_gen() {  // if random cvars is 0 (off) end function    if(get_pcvar_num(g_iRandom)==0)  {   return PLUGIN_HANDLED;  }else{   // else ratio == a random number between random cvar and ratio cvar     g_iRatio =  random_num(get_pcvar_num(g_iRandom),get_pcvar_num(g_iRatio));  }  return PLUGIN_HANDLED; }

using only 1 = sign (assignemnt) made it crash , but its still not generating a random number any ideas ???
The Specialist is offline
Send a message via AIM to The Specialist
 



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 06:49.


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