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 andystormglass · Feb 13, 2016 at 08:26 PM · javascripterror-messagebce0044uce0001bce0043

BCE0043, BCE0044 and UCE0001 errors after upgrade from 4.3 to 5.3

Noob request. I just upgraded an old game from Unity 4.3 to 5.3, and managed to fix most of the problems, but am stuck on three errors.

  • (73,82): BCE0043: Unexpected token: ).

  • (73,83): BCE0044: expecting ), found ';'.

  • (73,84): UCE0001: ';' expected. Insert a semicolon at the end.

Any advice or insight? Thanks!!

 #pragma strict
 
 var player : Transform;
 var inventory : Transform;
 
 var optimalDistance:float = 4.5f;
 
 var tokenPink : GameObject;
 var tokenBlue : GameObject;
 
 var keyButton : GameObject;
 var chocoButton : GameObject;
 var casseteButton : GameObject;
 
 var key : GameObject;
 var cassete : GameObject;
 var chocolate : GameObject;
 
 var humSoundObj : GameObject;
 var errorSoundObj : GameObject;
 var keyDropSoundObj : GameObject;
 var buttonPressSoundObj : GameObject;
 var casseteDropSoundObj : GameObject;
 var chocoBarDropSoundObj : GameObject;
 var chocolateEatingSoundObj : GameObject;
 
 var insertedTokenCount : int = 0;
 public var keySoldCount : int = 0;
 public var casseteSoldCount : int = 0;
 private var chocolateSoldCount : int = 0;
 
 var keyDropAnim : AnimationClip;
 var casseteDropAnim : AnimationClip;
 var chocolateDropAnim : AnimationClip;
 
 private var tokenMessage : String = 'Enter Token';
 private var soldMessage : String = 'Sold Out';
 
 var tm : TextMesh;
 private var display : String = "";
 var displayError : boolean = true;
 
 var circuitPuzzle : GameObject;
 private var circuitPuzzleScript : BreakRoomCircuitPuzzle;
 
 //Chocolate eating effects
 var cameraObj : GameObject;
 private var message : String = '';
 private var displayMessage : boolean = false;
 
 var textInfo:GUIContent;
 var textStyle:GUIStyle;
 
 private var choclatyMessage : String[] = [    "I haven't felt that good since Archie Gemmill scored against Holland in 1978!",
                                             "I am Cornholio!",
                                             "I can't stop here. This is bat country.",
                                             "Aloha, Mister Hand!",
                                             "Looks like I picked the wrong week to quit VindiqoQos.",
                                             "Snootchie Bootchies!!!",
                                             "Groovy!",
                                             "Excellent.",
                                             "Bodacious.",
                                             "It's showtime.",
                                             "I think I just froze the left half of my brain!",
                                             "Look! I can't move my right arm!",
                                             "It's a Kafka rush. I feel like a bug."
                                         ];
 
 function Start () {
     if(gameObject.FindWithTag("Player")) {
         player = gameObject.FindWithTag("Player").transform;
     }
     circuitPuzzleScript = circuitPuzzle.GetComponent<BreakRoomCircuitPuzzle>();
 }
 
 function Update () {
     if(!circuitPuzzleScript.isCircuitPuzzleSolved){
         return;
     }
     
     if(!Camera.main && !player) {
         return;
     }
     
     if(!humSoundObj.audio.isPlaying){
         humSoundObj.audio.Play();
     }
     
     var distPlayer: float = Vector3.Distance(player.position, this.transform.position);
     if (distPlayer >= optimalDistance) {
         return;
     }
     
     if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Ended) {
         var hit : RaycastHit;
         var ray = Camera.main.GetComponent(Camera).ScreenPointToRay (Input.GetTouch(0).position);
         if (Physics.Raycast (ray, hit)) {
             if ((hit.transform.name == chocoButton.name) || (hit.transform.name == casseteButton.name) || (hit.transform.name == keyButton.name)){
                 buttonPressSoundObj.audio.Play();
                 
                 if (hit.transform.name == chocoButton.name){ 
                     if(chocolateSoldCount < 300){  //300 is subsititude of unlimited
                         if(insertedTokenCount >= 1){
                             chocolateSoldCount++;
                             insertedTokenCount--;
                             displayError = false;
                             DropItem(chocolate, chocolateDropAnim, chocoBarDropSoundObj);
                         } else {
                             DisplayMessage(tokenMessage);
                         }
                     } else {
                         DisplayMessage(soldMessage);
                     }
                 }
                 
                 if (hit.transform.name == casseteButton.name){ 
                     if(casseteSoldCount < 1){
                         if(insertedTokenCount >= 2){
                             casseteSoldCount++;
                             insertedTokenCount -= 2;
                             displayError = false;
                             DropItem(cassete, casseteDropAnim, casseteDropSoundObj);
                         } else {
                             DisplayMessage(tokenMessage);
                         }
                     } else {
                         DisplayMessage(soldMessage);
                     }
                 }
                 
                 if (hit.transform.name == keyButton.name){ 
                     if(keySoldCount < 1){
                         if(insertedTokenCount >= 1){
                             keySoldCount++;
                             insertedTokenCount--;
                             displayError = false;
                             DropItem(key, keyDropAnim, keyDropSoundObj);
                         } else {
                             DisplayMessage(tokenMessage);
                         }
                     } else {
                         DisplayMessage(soldMessage);
                     }
                 } 
             }
             if (hit.transform.name == 'Chocolate(Clone)'){
                 Destroy(hit.transform.gameObject);
                 chocolatyMessageDisplay();
                 chocolateEatingSoundObj.audio.Play();
                 iTween.ShakePosition(cameraObj, new Vector3(1,1,0), 2);
                 iTween.ShakeRotation(cameraObj, new Vector3(1,1,0), 2);
             }
         }
     }
     
     if(!displayError) {
         tm.text = insertedTokenCount.ToString() + " Tokens";
     }
 }
 
 function OnGUI() {
     if(displayMessage) {
 //        var centeredStyle = GUI.skin.GetStyle("Label");
 //        centeredStyle.alignment = TextAnchor.UpperCenter;
 //        centeredStyle.fontSize = Screen.width/30;
 //        GUI.Label(Rect(0, Screen.height / 6, Screen.width, Screen.height), message, centeredStyle);
         var width:int = 0.78 * Screen.width;
         var height:int =  0.12 * Screen.height;
         var tposx:int = (Screen.width - width)/2;
         var tposy:int = (Screen.height - height)/2;
         textInfo.text = message;
         textStyle.fontSize = 0.04 * Screen.height;
         GUI.Label(Rect(tposx, tposy, width, height), textInfo, textStyle);
     }
 }
 
 function DropItem(vmItem : GameObject, vmItemDrop : AnimationClip, vmAudioObj : GameObject){
     var newVendingItem : GameObject;
     newVendingItem = Instantiate(vmItem);
     newVendingItem.animation.Play(vmItemDrop.name);
     vmAudioObj.audio.Play();
 }
 
 function DisplayMessage(msg : String){
     displayError = true;
     tm.text = msg;
 }
 
 function chocolatyMessageDisplay(){
     var index : int = 0;
     index = Random.Range(1, choclatyMessage.Length);
     message = choclatyMessage[index];
     displayMessage = true;
     yield WaitForSeconds(2.5);
     displayMessage = false;
 }


Comment
Add comment · Show 1
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 llluper · Oct 17, 2016 at 07:11 AM 0
Share

Were you able to solve this problem? I'm having similar issues.

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

49 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

js(9,30): UCE0001: ';' expected. Insert a semicolon at the end. 0 Answers

Js autocomplete not working in 5.3.4 f1 2 Answers

Cant switch between legacy animations 0 Answers

NullReferenceException: Object reference not set to an instance of an object ? 0 Answers

How to rotate cube2 if the script is in cube1? 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