I just got the following error:
Assets/Scripts/PlayerMenu.cs(118,79): error CS1525: Unexpected symbol x', expecting .’
for the following line of code:
results =_tileMap.BreadthSearch(float x ,float z,int actPlayer.GetComponent<Skeleton>.movement);
I don’t see any problems in my code with parentheses and semicolons and I haven’t been able to figure out what I did wrong.
Below is the code snippet this was taken from :
void OnGUI()
{
GUI.Box (new Rect (10, 10, 100, 120), "Player");
if (GUI.Button (new Rect (20, 40, 80, 20), "Attack"))
{
//call on statechange function to play attack animation
stateChange(0);
}
//make the second button
if (GUI.Button (new Rect (20, 70, 80, 20), "Move"))
{
float x= actPlayer.transform.position.x;
float z=actPlayer.transform.position.z;
List<Vector3> results = new List<Vector3>();
results =_tileMap.BreadthSearch(float x ,float z,int actPlayer.GetComponent<Skeleton>.movement);
bool click=false;
while(click==false)
{
foreach(Vector3 result in results)
Instantiate(move, result, Quaternion.identity);
if(Input.GetMouseButtonDown(0))
{
print(Input.mousePosition);
Debug.Log ("Click!");
}
}
stateChange (1);
}
if (GUI.Button (new Rect (20, 100, 80, 20), "End Turn"))
{
print ("Turn oVer");
}
}