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 /
avatar image
-1
Question by youngtraffords96 · Jul 02, 2011 at 03:42 PM · syntax-errorbce0044

BCE0044: expecting :, found '='

BCE0044: expecting :, found '=' is an error that I can't find the answer to. I was wondering if you guys could look over and see?

{

//we're hit! Spin our character around

             transform.Rotate(0,tumbleSpeed * Time.deltaTime,0, Space.World);
             tumbleSpeed = tumbleSpeed-decreaseTime;
             decreaseTime += decayTime;
     }

} function (hit : ControllerColliderHit) //onTriggerEnter : collider {

 if(hit.gameObject.tag == "fallout"); 

{ dead = true; //the error is on this line, please help!

 //subtract life here 
 HealthControl.LIVES -= 1; 

}

 if(hit.gameObject.tag == "enemyProjectile")
 {
         gotHit = true;
 }

}

Comment
Add comment · Show 2
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 Graham-Dunnett ♦♦ · Jul 02, 2011 at 09:06 PM 0
Share

downvoted for posted the same question again

avatar image Dreamblur · Jul 02, 2011 at 09:11 PM 0
Share

Is this person creating new accounts whenever his/her last account gets negative karma?

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by kop4 · Jul 02, 2011 at 03:53 PM

On this line (above the error line)

 if(hit.gameObject.tag == "fallout");

There shouldn't be a semicolon at the end.

ps. when you post code, format it using the button with the ones and zeros to make it easy to read

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

Answer by FLASHDENMARK · Jul 02, 2011 at 03:53 PM

{

 //we're hit! Spin our character around
 
             transform.Rotate(0,tumbleSpeed * Time.deltaTime,0, Space.World);
             tumbleSpeed = tumbleSpeed-decreaseTime;
             decreaseTime += decayTime;
     }
 } 

function OnControllerColliderHit (hit : ControllerColliderHit) {

 if(hit.gameObject.tag == "fallout")
 { dead = true; //the error is on this line, please help!
 
 //subtract life here 
 HealthControl.LIVES -= 1; 
 }
 
 if(hit.gameObject.tag == "enemyProjectile")
 {
         gotHit = true;
 }
 }

That should do the trick. :)

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 youngtraffords96 · Jul 02, 2011 at 05:39 PM 0
Share

Hmmm.. I tried all of these, and the same error is still there, plus a couple new errors... Should I try re-scripting it?

avatar image kop4 · Jul 02, 2011 at 06:24 PM 0
Share

I would post my script but I can't get to it right now... I'll do it later

avatar image
1

Answer by aldonaletto · Jul 02, 2011 at 03:56 PM

It's a sintax error. The problem is one line above:

if(hit.gameObject.tag == "fallout"); <- remove this ";"

Comment
Add comment · Show 3 · 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 FLASHDENMARK · Jul 02, 2011 at 03:58 PM 1
Share

What about: function (hit : ControllerColliderHit) That is not a function. He forgot OnControllerColliderHit. Or am I wrong? :)

avatar image aldonaletto · Jul 02, 2011 at 04:13 PM 1
Share

Yes, I missed that big and fat error!

avatar image FLASHDENMARK · Jul 02, 2011 at 04:35 PM 0
Share

Ha, honest above all. :)

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

7 People are following this question.

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

Related Questions

FPS Script Error OnCollisonEnter 1 Answer

Unity MoveAround error 1 Answer

Unity3d C to Javascript conversion? 1 Answer

(10,47): BCE0044: expecting :, found '='. 2 Answers

Formatting problems in Script 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