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 ohParallel · Jul 06, 2016 at 09:15 AM · 1st person

HELP!? Assets/Scripts/PlayerGUI.js(5,25): UCE0001: ';' expected. Insert a semicolon at the end.

I am trying to make a FPS game by following a youtube tutorial. I have changed my controller script to unity 5 version but I keep getting semi colon error even though I have added them. Can anyone help?

 #pragma strict
 
 //Size Of Textures
 
 var size : Vector2 = New Vector2(180, 20);
 
 //Health Varibles
 var healthPos : Vector2 = New Vector2(20, 20);
 var healthBar : float = 1;
 var healthBarEmpty : Texture2D;
 var healthBarFull : Texture2D;
 
 //Hunger Varibles
 var hungerPos : Vector2 = New Vector2(20, 60);
 var hungerBar : float = 1;
 var hungerBarEmpty : Texture2D;
 var hungerBarFull : Texture2D;
 
 //Thirst Varibles
 var thirstPos : Vector2 = New Vector2(20, 100);
 var thirstBar : float = 1;
 var thirstBarEmpty : Texture2D;
 var thirstBarFull : Texture2D;
 
 //Stamina Varibles
 var staminaPos : Vector2 = New Vector2(20, 140);
 var staminatBar : float = 1;
 var staminaBarEmpty : Texture2D;
 var staminaBarFull : Texture2D;
 
 //Fall Rate
 var healthFullRate : int = 150;
 var hungerFullRate : int = 150;
 var thirstFullRate : int = 100;
 var staminaFullRate : int = 35;
 
 private var chMotor : UnityStandardAssets.Characters.FirstPerson.Prefabs.FPSController;
 private var controller : CharacterController;
 
 var canJump : boolean = false;
 
 var jumpTimer : float = 0.7;
 
 function start()
 {
     chMotor = GetComponent(CharacterMotor);
     controller = GetComponent(CharacterController);
 }
 
 function OnGUI()
 {
     //HealthGUI
     GUI.BeginGroup(new Rect (healthPs.x, healthPos,y, size.x, size.y));
     GUI.Box(Rect(0, 0, size.x, size.y), healthBarEmpty);
     
     GUI.BeginGroup(Rect (0, 0, size.x * healthBarDisplay, size.y));
     GUI.Box(Rect(0, 0, size.x, size.y), healthBarFull);
     
     GUI.EndGroup();
     GUI.EndGroup();
     
     //HungerGUI
     GUI.BeginGroup(new Rect (hungerPs.x, hungerPos,y, size.x, size.y));
     GUI.Box(Rect(0, 0, size.x, size.y), hungerBarEmpty);
     
     GUI.BeginGroup(Rect (0, 0, size.x * hungerBarDisplay, size.y));
     GUI.Box(Rect(0, 0, size.x, size.y), hungerBarFull);
     
     GUI.EndGroup();
     GUI.EndGroup();
     
     //ThirstGUI
     GUI.BeginGroup(new Rect (thirstPs.x, thirstPos,y, size.x, size.y));
     GUI.Box(Rect(0, 0, size.x, size.y), thirstBarEmpty);
     
     GUI.BeginGroup(Rect (0, 0, size.x * thirstBarDisplay, size.y));
     GUI.Box(Rect(0, 0, size.x, size.y), thirstBarFull);
     
     GUI.EndGroup();
     GUI.EndGroup();
     
     //StaminaGUI
     GUI.BeginGroup(new Rect (staminaPs.x, staminaPos,y, size.x, size.y));
     GUI.Box(Rect(0, 0, size.x, size.y), staminaBarEmpty);
     
     GUI.BeginGroup(Rect (0, 0, size.x * staminaBarDisplay, size.y));
     GUI.Box(Rect(0, 0, size.x, size.y), staminaBarFull);
     
     GUI.EndGroup();
     GUI.EndGroup();
 }

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

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

Related Questions

Licenses Question 1 Answer

如何使用Unity自带的OpenFileDialog开启Edit中OpenScene一样的Windows窗体 0 Answers

Need Help with char controller and animation 0 Answers

Jump not working 0 Answers

Help please. I have a problem with Error CS0120. C# 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