| computermajor12 (49) | |||
I'm trying to make a function to check if a Random number is less than or equal too another number (called hit_chance)
I'm not sure why this code isn't working? | |||
|
|
|||
| TheIdeasMan (1564) | |||
Variable Random is not declared, did you mean this?
This should be declared a const function because you are not changing the value of the arguments. You could investigate the use of the ternary ?: operator as a short cut for if then else. HTH Edit: Is there any way you can avoid posting code with line numbers? I had to manually delete each one. Edit2: You shoiuld have kept this in the other thread as they are so closely related. helios might spend time answering the same question in the other thread. | |||
|
Last edited on
|
|||