Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

alittle C# help plz

$
0
0
im a NEWBIE!!! to C# and following a book... and the code isnt doing as the book says..the book is telling me to use the Unity 3d engine
plz keep it as newbie friendly as possible thank you

using UnityEngine;
using System.Collections;

public class Leaningscript : MonoBehaviour 
{
	public int myNumber = 10;

	// Use this for initialization
	void Start () 
		{
		Debug.Log(2 + 9);//non varible should show 11

		Debug.Log(11 + myNumber); //using varibles should show 21
		}
	// Update is called once per frame
	void Update () 
		{
		}
}



the code and the output isnt matching up right...what am i doing wrong...  the line that should output the number 21 outputs the number 20

Viewing all articles
Browse latest Browse all 31927

Trending Articles



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