I have GUI coding here and for the life of me i cant figure out where my errors are.
Here is my script
void OnGUI() {
GUI.Label (new Rect (25, 25, 100, 30), "Job:");
GUI.Label (new Rect (10, 10, 100, 30), curJob);
GUI.Label (new Rect (30, 10, 100, 30), "Salary:");
GUI.Label (new Rect (60, 10, 100, 30), Salary);
GUI.Label (new Rect (110, 10, 100, 30), "Money");
GUI.Label (new Rect (150, 10, 100, 30), curMoney);
I do have these variables
public int curMoney = 1000;
public int curHealth = 100;
public int maxHealth = 100;
public string curJob = "Citizen";
public float Salary = 50f;
I am probably barely missing where the problem is and Im reading these errors and change stuff and still i get errors...
Assets/Scripts/JobInfo.cs(26,21): error CS1502: The best overloaded method match for `UnityEngine.GUI.Label(UnityEngine.Rect, string)' has some invalid arguments
Assets/Scripts/JobInfo.cs(26,21): error CS1503: Argument `#2' cannot convert `float' expression to type `string'
Assets/Scripts/JobInfo.cs(28,21): error CS1502: The best overloaded method match for `UnityEngine.GUI.Label(UnityEngine.Rect, string)' has some invalid arguments
Assets/Scripts/JobInfo.cs(28,21): error CS1503: Argument `#2' cannot convert `int' expression to type `string'