Hi there i have a possible stupid question but hang in there. When i went into playmode with this script it worked just fine but when i went to build it it came up with this error:
Assets/Assets/scripts/Character menus/character skills.js(221,34): BCE0004: Ambiguous reference ‘Label’: UnityEngine.GUI.Label(UnityEngine.Rect, UnityEngine.GUIContent), UnityEngine.GUI.Label(UnityEngine.Rect, UnityEngine.Texture), UnityEngine.GUI.Label(UnityEngine.Rect, String).
here is a copy of the script:
///////////////////
var myskin : GUISkin;
var level ;
var playerhealth ;
var maxfatigue ;
var magic ;
var strength ;
var accuracy ;
var ranged ;
var Totalattack ;
var defensiveability ;
var totaldefense ;
var unarmedtactics ;
var unarmed ;
var unarmedability ;
var intelligence ;
var woodsmanship ;
var swimming ;
var horsemanship ;
var leatherworking ;
var woodworking ;
var cooking ;
//
var skillsxp;
var maxunarmedtacticsxp;
var maxunarmedabilityxp;
var maxunarmedxp;
var maxtotaldefensexp;
var maxlevelxp ;
var levelxp ;
var playerhealthxp ;
var maxfatiguexp ;
var fatiguexp ;
var magicxp ;
var maxmagicxp ;
var strengthxp ;
var accuracyxp ;
var maxaccuracyxp ;
var rangedxp ;
var maxrangedxp ;
var Totalattackxp ;
var defensiveabilityxp ;
var totaldefensexp ;
var unarmedtacticsxp ;
var unarmedxp ;
var unarmedabilityxp ;
var intelligencexp ;
var woodsmanshipxp ;
var swimmingxp ;
var horsemanshipxp ;
var leatherworkingxp ;
var woodworkingxp ;
var cookingxp ;
var Totalevelsxp ;
var accuracyxpbar;
var maxtotalattackxp;
var maxplayerhealthxp;
private var characterstats;
/////////////////////////////////////////////
function Update(){
if(Input.GetKeyDown("Backslash")){
if(characterstats == true){
characterstats = false;
Time.timeScale = 1;
AudioListener.volume = 1;
Screen.showCursor = false;
}
else if(characterstats == false){
characterstats = true;
AudioListener.volume = 0;
Time.timeScale = 0;
Screen.showCursor = true;
}
}
}
function Start(){
characterstats = false;
Time.timeScale = 1;
AudioListener.volume = 1;
Screen.showCursor = false;
}
private var leatherworkingDropDown = false;
private var woodworkingDropDown = false;
private var horsemanshipDropDown = false;
private var cookingDropDown = false;
private var swimmingDropDown = false;
private var woodsmanshipDropDown = false;
function OnGUI () {
GUI.skin = myskin;
GUI.color = Color.blue;
if(characterstats == true){
GUI.Box(Rect(0,0,Screen.width,Screen.height), "Skills Menu");
//woodsmanship menu
if(GUI.Button(Rect(10,160,200,100), "Woodsmanship")){
if(woodsmanshipDropDown == false){
woodsmanshipDropDown = true;
}
else{
woodsmanshipDropDown = false;
}
}
if(woodsmanshipDropDown == true){
swimmingDropDown = false;
horsemanshipDropDown = false;
woodworkingDropDown = false;
leatherworkingDropDown = false;
cookingDropDown = false;
GUI.Box(Rect(210,0,Screen.width - 210,Screen.height), "");
GUI.Label(Rect(220,70,100,50), "accuracy");
GUI.Label(Rect(220,90,100,50), (accuracy));
GUI.Label(Rect(320,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(220,150,100,50), (accuracyxp));
GUI.Label(Rect(270,150,100,50), ("/"));
GUI.Label(Rect(220,130,100,50), "accuracy xp");
GUI.Label(Rect(530,70,100,50), "fatigue");
GUI.Label(Rect(530,90,100,50), (maxfatigue));
GUI.Label(Rect(530,130,100,50), "fatigue xp");
GUI.Label(Rect(630,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(530,150,100,50), (accuracyxp));
GUI.Label(Rect(580,150,100,50), ("/"));
GUI.Label(Rect(220,190,100,50), "magic");
GUI.Label(Rect(220,250,100,50), "magic xp");
GUI.Label(Rect(220,210,100,50), (magic));
GUI.Label(Rect(320,270,100,50), (maxmagicxp));
GUI.Label(Rect(220,270,100,50), (magicxp));
GUI.Label(Rect(270,270,100,50), ("/"));
GUI.Label(Rect(530,190,100,50), "health");
GUI.Label(Rect(530,250,100,50), "health xp");
GUI.Label(Rect(530,210,100,50), (playerhealth));
GUI.Label(Rect(530,270,100,50), (playerhealthxp));
GUI.Label(Rect(580,270,100,50), ("/"));
GUI.Label(Rect(630,270,100,50), (maxplayerhealthxp));
GUI.Label(Rect(220,310,100,50), "strenth");
GUI.Label(Rect(220,370,100,50), "strenth xp");
GUI.Label(Rect(220,330,100,50), (strength));
GUI.Label(Rect(220,390,100,50), (strengthxp));
GUI.Label(Rect(280,390,100,50), ("/"));
GUI.Label(Rect(320,390,100,50), (maxplayerhealthxp));
GUI.Label(Rect(400,10,100,50), "Woodsmanship");
//
if(Input.GetKeyDown("backslash")){
woodsmanshipDropDown = false;
}
}
if(GUI.Button(Rect(10,160,200,100), "Swimming")){
if(swimmingDropDown == false){
swimmingDropDown = true;
}
else{
swimmingDropDown = false;
}
}
if(swimmingDropDown == true){
woodsmanshipDropDown = false;
horsemanshipDropDown = false;
woodworkingDropDown = false;
leatherworkingDropDown = false;
cookingDropDown = false;
GUI.Box(Rect(210,0,Screen.width - 210,Screen.height), "");
GUI.Label(Rect(220,70,100,50), "accuracy");
GUI.Label(Rect(220,90,100,50), (accuracy));
GUI.Label(Rect(320,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(220,150,100,50), (accuracyxp));
GUI.Label(Rect(270,150,100,50), ("/"));
GUI.Label(Rect(220,130,100,50), "accuracy xp");
GUI.Label(Rect(530,70,100,50), "fatigue");
GUI.Label(Rect(530,90,100,50), (maxfatigue));
GUI.Label(Rect(530,130,100,50), "fatigue xp");
GUI.Label(Rect(630,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(530,150,100,50), (accuracyxp));
GUI.Label(Rect(580,150,100,50), ("/"));
GUI.Label(Rect(220,190,100,50), "magic");
GUI.Label(Rect(220,250,100,50), "magic xp");
GUI.Label(Rect(220,210,100,50), (magic));
GUI.Label(Rect(320,270,100,50), (maxmagicxp));
GUI.Label(Rect(220,270,100,50), (magicxp));
GUI.Label(Rect(270,270,100,50), ("/"));
GUI.Label(Rect(530,190,100,50), "health");
GUI.Label(Rect(530,250,100,50), "health xp");
GUI.Label(Rect(530,210,100,50), (playerhealth));
GUI.Label(Rect(530,270,100,50), (playerhealthxp));
GUI.Label(Rect(580,270,100,50), ("/"));
GUI.Label(Rect(630,270,100,50), (maxplayerhealthxp));
GUI.Label(Rect(220,310,100,50), "strenth");
GUI.Label(Rect(220,370,100,50), "strenth xp");
GUI.Label(Rect(220,330,100,50), (strength));
GUI.Label(Rect(220,390,100,50), (strengthxp));
GUI.Label(Rect(280,390,100,50), ("/"));
GUI.Label(Rect(320,390,100,50), (maxplayerhealthxp));
GUI.Label(Rect(400,10,100,50), "Swimming");
if(Input.GetKeyDown("backslash")){
swimmingDropDown = false;
}
}
if(GUI.Button(Rect(10,160,200,100), "Horsemanship")){
if(horsemanshipDropDown == false){
horsemanshipDropDown = true;
}
else{
horsemanshipDropDown = false;
}
}
if(horsemanshipDropDown == true){
woodsmanshipDropDown = false;
swimmingDropDown = false;
woodworkingDropDown = false;
leatherworkingDropDown = false;
cookingDropDown = false;
GUI.Box(Rect(210,0,Screen.width - 210,Screen.height), "");
GUI.Label(Rect(220,70,100,50), "accuracy");
GUI.Label(Rect(220,90,100,50), (accuracy));
GUI.Label(Rect(320,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(220,150,100,50), (accuracyxp));
GUI.Label(Rect(270,150,100,50), ("/"));
GUI.Label(Rect(220,130,100,50), "accuracy xp");
GUI.Label(Rect(530,70,100,50), "fatigue");
GUI.Label(Rect(530,90,100,50), (maxfatigue));
GUI.Label(Rect(530,130,100,50), "fatigue xp");
GUI.Label(Rect(630,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(530,150,100,50), (accuracyxp));
GUI.Label(Rect(580,150,100,50), ("/"));
GUI.Label(Rect(220,190,100,50), "magic");
GUI.Label(Rect(220,250,100,50), "magic xp");
GUI.Label(Rect(220,210,100,50), (magic));
GUI.Label(Rect(320,270,100,50), (maxmagicxp));
GUI.Label(Rect(220,270,100,50), (magicxp));
GUI.Label(Rect(270,270,100,50), ("/"));
GUI.Label(Rect(530,190,100,50), "health");
GUI.Label(Rect(530,250,100,50), "health xp");
GUI.Label(Rect(530,210,100,50), (playerhealth));
GUI.Label(Rect(530,270,100,50), (playerhealthxp));
GUI.Label(Rect(580,270,100,50), ("/"));
GUI.Label(Rect(630,270,100,50), (maxplayerhealthxp));
GUI.Label(Rect(220,310,100,50), "strenth");
GUI.Label(Rect(220,370,100,50), "strenth xp");
GUI.Label(Rect(220,330,100,50), (strength));
GUI.Label(Rect(220,390,100,50), (strengthxp));
GUI.Label(Rect(280,390,100,50), ("/"));
GUI.Label(Rect(320,390,100,50), (maxplayerhealthxp));
GUI.Label(Rect(400,10,100,50), "Horsemanship");
if(Input.GetKeyDown("backslash")){
horsemanshipDropDown = false;
}
}
if(GUI.Button(Rect(10,160,200,100), "Cooking")){
if(cookingDropDown == false){
cookingDropDown = true;
}
else{
cookingDropDown = false;
}
}
if(cookingDropDown == true){
woodsmanshipDropDown = false;
swimmingDropDown = false;
woodworkingDropDown = false;
leatherworkingDropDown = false;
horsemanshipDropDown = false;
GUI.Box(Rect(210,0,Screen.width - 210,Screen.height), "");
GUI.Label(Rect(220,70,100,50), "accuracy");
GUI.Label(Rect(220,90,100,50), (accuracy));
GUI.Label(Rect(320,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(220,150,100,50), (accuracyxp));
GUI.Label(Rect(270,150,100,50), ("/"));
GUI.Label(Rect(220,130,100,50), "accuracy xp");
GUI.Label(Rect(530,70,100,50), "fatigue");
GUI.Label(Rect(530,90,100,50), (maxfatigue));
GUI.Label(Rect(530,130,100,50), "fatigue xp");
GUI.Label(Rect(630,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(530,150,100,50), (accuracyxp));
GUI.Label(Rect(580,150,100,50), ("/"));
GUI.Label(Rect(220,190,100,50), "magic");
GUI.Label(Rect(220,250,100,50), "magic xp");
GUI.Label(Rect(220,210,100,50), (magic));
GUI.Label(Rect(320,270,100,50), (maxmagicxp));
GUI.Label(Rect(220,270,100,50), (magicxp));
GUI.Label(Rect(270,270,100,50), ("/"));
GUI.Label(Rect(530,190,100,50), "health");
GUI.Label(Rect(530,250,100,50), "health xp");
GUI.Label(Rect(530,210,100,50), (playerhealth));
GUI.Label(Rect(530,270,100,50), (playerhealthxp));
GUI.Label(Rect(580,270,100,50), ("/"));
GUI.Label(Rect(630,270,100,50), (maxplayerhealthxp));
GUI.Label(Rect(220,310,100,50), "strenth");
GUI.Label(Rect(220,370,100,50), "strenth xp");
GUI.Label(Rect(220,330,100,50), (strength));
GUI.Label(Rect(220,390,100,50), (strengthxp));
GUI.Label(Rect(280,390,100,50), ("/"));
GUI.Label(Rect(320,390,100,50), (maxplayerhealthxp));
GUI.Label(Rect(400,10,100,50), "Cooking");
if(Input.GetKeyDown("backslash")){
cookingDropDown = false;
}
}
if(GUI.Button(Rect(10,160,200,100), "Cooking")){
if(horsemanshipDropDown == false){
horsemanshipDropDown = true;
}
else{
horsemanshipDropDown = false;
}
}
if(cookingDropDown == true){
woodsmanshipDropDown = false;
swimmingDropDown = false;
woodworkingDropDown = false;
leatherworkingDropDown = false;
horsemanshipDropDown = false;
GUI.Box(Rect(210,0,Screen.width - 210,Screen.height), "");
GUI.Label(Rect(220,70,100,50), "accuracy");
GUI.Label(Rect(220,90,100,50), (accuracy));
GUI.Label(Rect(320,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(220,150,100,50), (accuracyxp));
GUI.Label(Rect(270,150,100,50), ("/"));
GUI.Label(Rect(220,130,100,50), "accuracy xp");
GUI.Label(Rect(530,70,100,50), "fatigue");
GUI.Label(Rect(530,90,100,50), (maxfatigue));
GUI.Label(Rect(530,130,100,50), "fatigue xp");
GUI.Label(Rect(630,150,100,50), (maxaccuracyxp));
GUI.Label(Rect(530,150,100,50), (accuracyxp));
GUI.Label(Rect(580,150,100,50), ("/"));
GUI.Label(Rect(220,190,100,50), "magic");
GUI.Label(Rect(220,250,100,50), "magic xp");
GUI.Label(Rect(220,210,100,50), (magic));
GUI.Label(Rect(320,270,100,50), (maxmagicxp));
GUI.Label(Rect(220,270,100,50), (magicxp));
GUI.Label(Rect(270,270,100,50), ("/"));
GUI.Label(Rect(530,190,100,50), "health");
GUI.Label(Rect(530,250,100,50), "health xp");
GUI.Label(Rect(530,210,100,50), (playerhealth));
GUI.Label(Rect(530,270,100,50), (playerhealthxp));
GUI.Label(Rect(580,270,100,50), ("/"));
GUI.Label(Rect(630,270,100,50), (maxplayerhealthxp));
GUI.Label(Rect(220,310,100,50), "strenth");
GUI.Label(Rect(220,370,100,50), "strenth xp");
GUI.Label(Rect(220,330,100,50), (strength));
GUI.Label(Rect(220,390,100,50), (strengthxp));
GUI.Label(Rect(280,390,100,50), ("/"));
GUI.Label(Rect(320,390,100,50), (maxplayerhealthxp));
GUI.Label(Rect(400,10,100,50), "Cooking");
if(Input.GetKeyDown("backslash")){
cookingDropDown = false;
}
}
}}
any help would be greatly appreciated thanks.