- Home /
This question was
closed Feb 12, 2017 at 12:03 AM by
hsghgs for the following reason:
Fixed the errormy self
Question by
hsghgs · Feb 11, 2017 at 11:39 PM ·
error message
Help with my Save and load script please!
So i made this script to load and save i am jsut testing and plan to add more variables later however when i created the script i got a error
Here is my Click Script which has the gold float inside
using System.Collections;
using UnityEngine;
public class Click : MonoBehaviour {
public UnityEngine.UI.Text GPC;
public UnityEngine.UI.Text goldDisplay;
public float gold = 0.00f;
public int goldperclick = 1;
void Update () {
goldDisplay.text = "Gold : " + Currency.Instance.GetCurrencyIntoString(gold, false, false);
GPC.text = "GPC: " + goldperclick;
}
public void Clicked(){
gold = gold + goldperclick;
}
}
error.png
(131.6 kB)
Comment
Answer by tanoshimi · Feb 11, 2017 at 11:40 PM
I'd say the error message is pretty self-explanatory: you haven't declared a variable called "Clicker" anywhere.
im trying to declare the Clicker button which has my Click script inside of it which holds the gold value
How do i do this