Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
it says error CS1525 Unexpected symbol 'Application' when I try to use this command:

Application.Quit();


here is what I wrote in Microsoft visual studio:

using UnityEngine;

public class Credits : MonoBehaviour {

public void Quit()
{
Debug.Log("QUIT")
Application.Quit();
}
}

What I have tried:

I tried to use the solutions that the program gave me and it didn't worked
Posted
Updated 18-Feb-18 15:44pm
Comments
Richard MacCutchan 18-Feb-18 3:45am    
You are missing a semi-colon at the end of the previous statement.

1 solution

As Richard pointed out you do not have a semi-colon (;) at the end of the Debug.Log() statement. So, the compiler is telling you that it did not expect to see Application.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900