I am getting a debug error of CS0103 only as marked in comments in code. Oddly i do not get it at my getcomponent line. I have referred back to other working examples of code that I am currently using and I believe I have proper syntax in my code. Any Idea’s? This CS script will run on a panel object in DF-GUI.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class AlienMinerPanelEvents : MonoBehaviour
{
public AlienMinerMove aAMM;
public void OnMouseEnter( dfControl control, dfMouseEventArgs mouseEvent )
{
GameObject[] shipObjects = GameObject.FindGameObjectsWithTag("Ships");
foreach (GameObject ship in shipObjects)
{
aAMM = ship.GetComponent<AlienMinerMove>();
try
{
if(aAAM.selected == true) //error CS0103 here
{
aAAM.defaultMouseAllow = false; //error CS0103 here
}
}
catch
{
Debug.Log("Horrible things happened!");
}
}
Debug.Log( "MouseEnter" );
}
public void OnMouseLeave( dfControl control, dfMouseEventArgs mouseEvent )
{
GameObject[] shipObjects = GameObject.FindGameObjectsWithTag("Ship");
foreach (GameObject ship in shipObjects)
{
aAMM = ship.GetComponent<AlienMinerMove>();
try
{
if(aAAM.selected == true) //error CS0103 here
{
aAAM.defaultMouseAllow = true; //error CS0103 here
}
}
catch
{
Debug.Log("Horrible things happened!");
}
}
Debug.Log( "MouseLeave" );
}
}