Jump to content
Sign in to follow this  
Zze

having a problem trying to get a random int..

Recommended Posts

hey, i am trying to set a random integer to set a random amount of rubles on a player at spawn...

so far i've tried

int cashrd = int.Parse(Math.RandomIntInclusive(8,348));

  - returns a string for some reason xD?
 

int cashrnd = random 348;  

-fucks off and thinks there isn't a semicolon :/

am I just stupid or what am i doing wrong :3?
 

Share this post


Link to post
Share on other sites

Using just this without int.Parse should work. It already returns an integer.

int cashrd = Math.RandomIntInclusive( 8, 348 );

This isn't valid code:

int cashrnd = random 348;

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×