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 /
This question was closed Oct 16, 2015 at 11:38 AM by Graham-Dunnett.
avatar image
1
Question by ZachAttack9280 · Oct 16, 2015 at 11:34 AM · errorfpsbce0019

Error BCE0019

Hi, so im new at this and im making a survival game, this code is for the playerGUI and/or my FPS Arms Here is the code.

Code:

 #pragma strict
 
 private var hasAxe : boolean = false;
 
 private var canSwing : boolean = true;
 private var isSwinging : boolean = false;
 var swingTimer : float = 0.7;
 
 private var controller : CharacterController;
 private var playerGUI : PlayerGUI;
 
 function Start()
 {
     hasAxe = true;
     controller = GameObject.Find("First Person Controller").GetComponent(CharacterController);
     playerGUI = GameObject.Find("First Person Controller").GetComponent(PlayerGUI);
 }
 
 function Update()
 {
     //If we aren't moving and if we aren't swinging, then we idle!
     
     if(controller.velocity.magnitude <= 0 && isSwinging == false)
     {
         GetComponent.<Animation>().Play("Idle");
         GetComponent.<Animation>()["Idle"].wrapMode = WrapMode.Loop;
         GetComponent.<Animation>()["Idle"].speed = 0.2;
     }
     
     //If we're holding shift and moving, then sprint!
     
     if(controller.velocity.magnitude > 0 && Input.GetKey(KeyCode.LeftShift))
     {
         GetComponent.<Animation>().Play("Sprint");
         GetComponent.<Animation>()["Sprint"].wrapMode = WrapMode.Loop;
     }
     
     //WOODCUTTING SECTION
     if(hasAxe == true && canSwing == true)
     {
         if(Input.GetMouseButtonDown(0))
         {
             //Stamina reduction applied to the PlayerGUI script
             playerGUI.staminaBarDisplay -= 0.1;
             
             //Swinging animation
             GetComponent.<Animation>().Play("Swing");
             GetComponent.<Animation>()["Swing"].speed = 2;
             isSwinging = true;
             canSwing = false;
         }
     }
     
     if(canSwing == false)
     {
         swingTimer -= Time.deltaTime;
     }
     
     if(swingTimer <= 0)
     {
         swingTimer = 1;
         canSwing = true;
         isSwinging = false;
     }
 }

Error: Assets/Animations/Part 3 - Animations_Arms/PlayerGUI.js(44,35): BCE0019: 'staminaBarDisplay' is not a member of 'PlayerGUI.

Why does it keep on saying' "staminaBarDisplay' is not a member of 'PlayerGUI."?

Comment
Comments Locked · Show 4
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 meat5000 ♦ · Oct 16, 2015 at 09:54 AM 0
Share

Does sta$$anonymous$$aBarDisplay actually exist in your PlayerGUI script?

If so, is it public?

avatar image Xarbrough · Oct 16, 2015 at 11:36 AM 0
Share

The error says that, because "sta$$anonymous$$aBarDisplay" can't be accessed at the PlayerGUI class. Either the member is not public, or it got deleted or moved somewhere else. $$anonymous$$ake sure the variable actually exists and is set to public. Intellisense/Auto-Complete will also tell you right away if it can find it.

avatar image Graham-Dunnett ♦♦ · Oct 16, 2015 at 11:37 AM 1
Share

I added bce0019 as a tag for you to look at existing questions and answers.

avatar image meat5000 ♦ · Oct 16, 2015 at 12:52 PM 1
Share

Graham is right. This is super-common. The answer is the same for everyone.

https://www.google.co.uk/search?q=unity+bce0019&ie=utf-8&oe=utf-8&gws_rd=cr&ei=2PIgVt7aGYWvUYG-gsgD

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

36 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

Related Questions

Error BCE0018 0 Answers

My player won't move!,Why is my player not moving? 1 Answer

UNITY shooting script does nothing 1 Answer

errors only appear after i play the builded version of the game 0 Answers

Failed to re-package resources 0 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