Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by ScarletMcLearn · May 08, 2016 at 04:00 PM · monodevelopparseparsingparsing error

How to fix this parsing error?

What is wrong in this source code? How do I fix this parse error?

Error Message: Assets/Scripts/NumberWizard.cs(40,22): error CS8025: Parsing error

Source Code:

using UnityEngine; using System.Collections;

public class NumberWizard : MonoBehaviour {

 // Use this for initialization
 void Start () 
 {
 print ("Welcome to NumberWizard!");
 print ("Pick a number in your head, but dont tell me.");

 int maximum = 1000;
 int minimum = 1;

 print ("The highest number you can pick is" + maximum);
 print ("The lowest number you can pick is" + minimum);

 print ("Is the number higher or lower than 500?");
 print ("Press UP for higher, DOWN for lower, and RETURN for equals to 500.");


 }


 
 // Update is called once per frame

void Update (){

     if (Input.GetKeyDown(KeyCode.UpArrow)) 
        {
         print ("You pressed UP");
        }


     if (Input.GetKeyDown(KeyCode.DownArrow)) 
       {
         print ("You pressed DOWN");
       }

          }



Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Cherno · May 08, 2016 at 04:39 PM 0
Share
  1. Please format your code properly.

  2. If there is an error, post the complete emessage.

  3. Parsing errors are commonly occuring because you forget a "}" or ";" somewhere.

avatar image tanoshimi · May 08, 2016 at 04:49 PM 0
Share

What parse error?

avatar image ScarletMcLearn · May 08, 2016 at 05:18 PM 0
Share

UPDATE:

The error message :

Assets/Scripts/NumberWizard.cs(40,22): error CS8025: Parsing error

avatar image ScarletMcLearn · May 08, 2016 at 05:18 PM 0
Share

UPDATE:

The error message :

Assets/Scripts/NumberWizard.cs(40,22): error CS8025: Parsing error

avatar image tanoshimi ScarletMcLearn · May 08, 2016 at 05:19 PM 0
Share

And do you have a closing } at the end of your script?

avatar image ScarletMcLearn tanoshimi · May 08, 2016 at 05:33 PM 0
Share

This is the entire Source Code, do feel free to edit it to show the error :

using UnityEngine; using System.Collections;

public class NumberWizard : $$anonymous$$onoBehaviour {

// Use this for initialization void Start () { print ("Welcome to NumberWizard!"); print ("Pick a number in your head, but dont tell me.");

int maximum = 1000; int $$anonymous$$imum = 1;

print ("The highest number you can pick is" + maximum); print ("The lowest number you can pick is" + $$anonymous$$imum);

print ("Is the number higher or lower than 500?"); print ("Press UP for higher, DOWN for lower, and RETURN for equals to 500.");

}

// Update is called once per frame void Update (){

  if (Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.UpArrow)) 
     {
      print ("You pressed UP");
     }


  if (Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.DownArrow)) 
    {
      print ("You pressed DOWN");
    }

       }
avatar image ScarletMcLearn ScarletMcLearn · May 08, 2016 at 05:32 PM 0
Share

This is the entire Source Code, do feel free to edit it to show the error :

using UnityEngine; using System.Collections;

public class NumberWizard : $$anonymous$$onoBehaviour {

 // Use this for initialization
 void Start () 
 {
 print ("Welcome to NumberWizard!");
 print ("Pick a number in your head, but dont tell me.");

 int maximum = 1000;
 int $$anonymous$$imum = 1;

 print ("The highest number you can pick is" + maximum);
 print ("The lowest number you can pick is" + $$anonymous$$imum);

 print ("Is the number higher or lower than 500?");
 print ("Press UP for higher, DOWN for lower, and RETURN for equals to 500.");


 }


 
 // Update is called once per frame

void Update (){

     if (Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.UpArrow)) 
        {
         print ("You pressed UP");
        }


     if (Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.DownArrow)) 
       {
         print ("You pressed DOWN");
       }

          }

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by tanoshimi · May 08, 2016 at 05:42 PM

You're missing a closing } at the end of the script, which would be clear if you indented and formatted your code properly...

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ScarletMcLearn · May 08, 2016 at 05:51 PM 0
Share

Oh! Thank you Tanoshimi! Helped a lot! That was a silly mistake. :< Thanks!

avatar image ScarletMcLearn ScarletMcLearn · May 08, 2016 at 05:52 PM 0
Share

@tanoshimi

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Parsing error 1 Answer

Copy and Pasted code for Trajectory and got one parsing error... 1 Answer

error cs8025 parsing error? 1 Answer

Error CS0118: Armor.DisplayName is a property but a type was expected 0 Answers

Parsing error CS8205,Parsing Error CS8205 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges