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 Fearthefrozt · May 01, 2014 at 04:41 PM · javascripterrorcompilerboo

Javascript(Unityscript) returning Boo compiler error

I was having a discussion with some friends of mine about what language would be good as a first Unity programming language so I decided to do some experimenting. I know that Javascript or Unityscript is a dynamically typed language and allows implicit variable declaration so I wanted to see exactly what kinds of errors I could get with that, these would be simple errors that a beginner might come code by accident and not realize it and have a really hard time debugging it. So I wrote this script.

 var myVar;
 
 function Start () {
     if (myVar > 0)
     {
         Debug.Log("Entered If");
     }
 }

I build it in visual studio and it's fine, but obviously there's a big problem with this code, myVar isn't initialized to anything. So it really shouldn't know what to do with the if statement. When I run my scene the scene still runs perfectly and nothing seems wrong except for an error that prints in the console. If a beginner was taught correctly then they would look at the error and try to figure it out which wouldn't be too difficult with this script, however I found something that really caught my attention. The error was this.

NullReferenceException: Object reference not set to an instance of an object Boo.Lang.Runtime.RuntimeServices.InvokeBinaryOperator (System.String operatorName, System.Object lhs, System.Object rhs) Implicit Variable Declaration Test.Start () (at Assets/Resources/Scripts/Implicit Variable Declaration Test.js:6)

See anything weird? How about this line: Boo.Lang.Runtime.RuntimeServices.InvokeBinaryOperator (System.String operatorName, System.Object lhs, System.Object rhs)

Still don't see it? Well that is a BOO compiler error, which is a completely different language from Unityscript. So my question is why does a Boo error return from a Unityscript? There's probably a really simple explanation like Unityscript doesn't actually compile and the Boo compiler is used for certain things regarding Unityscript files but I still thought it was a bit weird.

Comment
Add comment
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

0 Replies

· Add your reply
  • Sort: 

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

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Got A error and dont know how to fix it 0 Answers

Compiler error while switching to android 1 Answer

Very odd but harmless error? *Not that urgent* 1 Answer

Boo.Lang.Compiler.CompilerError appears when using eval 0 Answers

MasterServer errors 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