Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by Atristiel · May 24, 2015 at 02:58 PM · monodevelopbuild error

MonoDevelop "Build failed. Illegal character in path."

I have just started using Unity with limited programming experience. I have an issue with MonoDevelop when I want to build my script to allow a sphere to roll left and right.

 #pragma strict
 
 float rotationSpeed = 100;
 var rb : Rigidbody;
 
 function Start ()
 {
     rb = GetComponent.<Rigidbody>();
 }
 
 function Update () 
 {
     float rotation = Input.GetAxis ("Horizontal") * rotationSpeed;
     rotation *= Time.deltaTime;
     rb.AddRelativeTorque (Vector3.back * rotation);
 }

The error is just as the title states "Build failed. Illegal character in path." alt text

Strangely enough, Unity thinks the error is quite different: alt text

When I comment out everything meaningful in my code, the error is still persistently sitting there meaning that this error is not related to my code. This doesn't help and after frustratingly long research, I still didn't find a way to satisfy it. I assume that if this is not resolved, I won't be able to write any other scripts in the future which will greatly limit my possibilities. Your help will be appreciated, thanks in advance.

capture.png (127.5 kB)
capture2.png (281.2 kB)
Comment
Add comment · Show 3
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 Scribe · May 24, 2015 at 03:01 PM 0
Share

your script is a .js (Unityscript) but float rotationSpeed = 100; is C# syntax, perhaps you mean rotationSpeed :float = 100.0;

avatar image Scribe · May 24, 2015 at 03:03 PM 0
Share

sorry, just read your question properly, though the errors in code is what unity is complaining about, the monodevelop complaint is probably something else as you say. Is there anything strange in your Username on the computer, foreign letters etc?

avatar image maccabbe · May 24, 2015 at 03:12 PM 0
Share

Try replacing the C# code in your javascript file with javascript code

 #pragma strict
  
 var rotationSpeed : float =100;
 var rb : Rigidbody;
  
 function Start ()
 {
     rb = GetComponent.<Rigidbody>();
 }
  
 function Update () 
 {
     var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
     rotation *= Time.deltaTime;
     rb.AddRelativeTorque (Vector3.back * rotation);
 }

and clearing the error messages. Compile time error messages remove themselves as they are fixed. Build time/run time error messages cannot detect if the changes in code would have fixed them and they remain in the log until they are manually cleared.

1 Reply

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

Answer by Atristiel · May 24, 2015 at 05:37 PM

No, there are just English letters everywhere over my computer files etc.

Sorry, I was learning a bit of C# beforehand and I thought var was a bad practice. Maybe it is in C# but I should adapt to Java Script when working with it I guess.

After I went along with your suggestion to fix syntax to Java Script, the error still appeared no matter what but when I looked into Unity, there were no errors. Out of curiosity, I pressed Play again and this time it actually worked!

As confusing as it was lessons to be taken out of this is that I should stick with a language's syntax and that this compiler error is irrelevant as long as Unity likes it.

Thanks for your time and advice guys.

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 Lo0NuhtiK · May 24, 2015 at 05:41 PM 1
Share

Yeah... using Drow sign language to speak to a $$anonymous$$lingon probably wouldn't go over very well either.

avatar image Atristiel · May 24, 2015 at 05:50 PM 0
Share

I can imagine.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

SqliteKit encrypt incorrectly 1 Answer

Any way to see if a gameObject has a component from MonoDevelop debugger? 0 Answers

How to stop MonoDevelop auto-collapsing curly brackets? 6 Answers

Why is Unity 4.3 so unstable? 0 Answers

MonoDevelop creates *.pidb files in my ASSETS folder 1 Answer


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