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
1
Question by FPS-SCAR · Oct 25, 2012 at 04:26 PM · errorfps

Compiler error: BCE0044: unexpected char: 0xFFFD

Hello,

I have been working on a FPS through a tutorial (a great one I might add) it's all been going great until I ran into a error that happens quite frequently (I think) It gives me the error on the compiler BCE0044: unexpected char: 0xFFFD. I have searched up all of the solutions for this but I cant really get what they are telling the user to do! this FPS has been in the workings for about 15 hours now and i would greatly appreciate help....

  sincerely
 var PlayerState : float;
 var PlayerAnimSec : GameObject;
 
 function Update () 
 {
     PlayerStateController();
     PlaterAnims();
 
 }
 
 function PlayerStateController()
 {
     if ((Input.GetAxis(”Vertical”) !=0 || Input.GetAxis(“horizontal”) !=0))
     {
     if (Input.GetButton(“Sprint”))
         {
         PlayerState = 2;
         }
     else
     {
     PlayerState = 1;
     }
 
 }
 else
 {
 PlayerState = 0;
 }
 
 }
 
 function PlayerAnims()
 {
 if (PlayerState == 0)
     {
     PlayerAnimSec.animation.CrossFade("sittingstill", 0.4);
     }
 else if (PlayerState == 1)
     {
     PlayerAnimSec.animation.CrossFade("walking", 0.4);
     }
 else if (PlayerState == 2)
     {
     PlayerAnimSec.animation.CrossFade("Sprint Anamation", 0.4);
     }
 }
 

Comment
Add comment · Show 6
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 Montraydavis · Oct 25, 2012 at 04:33 PM 0
Share

We need a little bit more information that that ... What does the compiler actually spit out ( Exact error, and all details attached ).

Try checking your log file, and it will tell you what the hell is going on ( most likely ).

avatar image DaveA · Oct 25, 2012 at 04:41 PM 0
Share

And paste the code here too. Sounds like you have some garbage in the file.

avatar image FPS-SCAR · Oct 25, 2012 at 06:59 PM 0
Share

error:

  1. Assets/Scripts/Player.js(13,24): BCE0044: unexpected char: 0xFFFD.

2.Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(193,54): UCW0003: WARNING: Bitwise operation '|' on boolean values won't shortcut. Did you mean '||'?

code:

var PlayerState : float; var PlayerAnimSec : GameObject;

function Update () { PlayerStateController(); PlaterAnims();

}

function PlayerStateController() { if ((Input.GetAxis(”Vertical”) !=0 || Input.GetAxis(“horizontal”) !=0)) { if (Input.GetButton(“Sprint”)) { PlayerState = 2; } else { PlayerState = 1; }

} else { PlayerState = 0; }

}

function PlayerAnims() { if (PlayerState == 0) { PlayerAnimSec.animation.CrossFade("sittingstill", 0.4); } else if (PlayerState == 1) { PlayerAnimSec.animation.CrossFade("walking", 0.4); } else if (PlayerState == 2) { PlayerAnimSec.animation.CrossFade("Sprint Anamation", 0.4); } }

thanks FPS-SCAR

avatar image FPS-SCAR · Oct 25, 2012 at 06:59 PM 0
Share

I dont know why the comment thingie xD i dont know why it bundled up the code

avatar image FPS-SCAR · Oct 25, 2012 at 07:02 PM 0
Share

i posted it in the orig post up top (the code that is)

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by BiG · Oct 26, 2012 at 09:55 AM

This line (line 13, in fact):

 if ((Input.GetAxis(”Vertical”) !=0 || Input.GetAxis(“horizontal”) !=0))

is probably causing the error. First of all, you've written "horizontal" without the capital H (it should be "Horizontal").

But the real error that appears in the console (unexpected char: 0xFFFD) is probably due to ”Vertical”: it should be "Vertical" (look at the different quotation marks that you've used).

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 FPS-SCAR · Oct 26, 2012 at 02:30 PM 0
Share

Thank you so much! it worked! YYEESS!!!!!

avatar image BiG · Oct 26, 2012 at 02:35 PM 0
Share

Yeah, that was an infamous error :) I have changed the question's title: it should be easier to find if other users have the same problem. Can you please mark the answer as correct?

avatar image
0

Answer by sybastian16 · Nov 30, 2012 at 08:58 PM

I'm trying to doa sample game from a book, but apparently either the monodevelop program is poop, or the author of the book has no idea what he's talking about when it comes to code. I'm not familiar with Javascript, so can someone see the problem in this snippet of code? If you need more, let me know. The error is "unexpected char: 0xFFFC (BCE0044)" and it's appearing on line 167. Ignore the indent spacing in this box:

function BuildDeck(){

var totalRobots:int = 4; // we've got four robots to work with var card:Object; // this stores a reference to a card var id:int = 0; for(i=0; i

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

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

14 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

Related Questions

Multiple Cars not working 1 Answer

Argument out of Range 1 Answer

NullReferenceException 1 Answer

CS0103 Error 1 Answer

FPS SCRIPT ERROR PLEASE HELP 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