Quantcast
Viewing all articles
Browse latest Browse all 2891

I keep getting this error(error CS0019: Operator `

public void OnClickRandomButton() { int spawnPointX; int spawnPointZ; int i = 1; int amountInput = int.Parse(amountInputField.text); do { spawnPointX = Random.Range(-150, 151); spawnPointZ = Random.Range(-150, 151); Vector3 spawnPosition = new Vector3(spawnPointX, 0, spawnPointZ); Instantiate(cubePrefabVar, spawnPosition, Quaternion.identity); i++; } while (i <= amountInputField); //error here } public void OnClickEvenButton() { int rows = 1; int columns = 1; int xInput = int.Parse(xInputField.text); int zInput = int.Parse(zInputField.text); do { do { Vector3 spawnPosition = new Vector3(10, 0, -10); Instantiate(cubePrefabVar, spawnPosition, Quaternion.identity); columns++; } while (columns <= zInputField); //error here rows++; columns = 1; } while (rows <= xInputField); //error here

Viewing all articles
Browse latest Browse all 2891

Trending Articles