Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

c# Randomizing a float but getting error CS0119

$
0
0
I'm trying to randomize a float but i keep getting this error, error CS0119; I've tried different ways but none seem to work. Can anyone help? public float[] values; void Start(){ values = new float[3]; values[1] = 5.0F; values[2] = 6.0F; values[3] = 7.0F; text_form (); foreach (float value in values) { print(value); } } void text_form(){ values[UnityEngine.Random.Range(0, values.Length)](); }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>