• 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 oinkoinkflapflap · Oct 02, 2010 at 07:32 AM · errorbce0044eof

EOF what does it mean?

it says expecting EOF found torquevalue (which is part of my script) could some1 enlighten me 2 what an EOF is :) cheers 4 the help ;)

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 TopHatGames · Jun 02, 2013 at 01:15 PM 0
Share

walkSpeed = 8;

}

runSpeed = 13;

}

if(Input.GetButtonDown("Run")) { moveSpeed = runSpeed; }

if(Input.GetButtonUp("Run")) { moveSpeed = walkSpeed; }

This was my script. It is for sprinting, but my "Expecting EOF" Showed up on line 7! So what do I do?

avatar image meat5000 ♦ · Oct 14, 2013 at 08:22 AM 0
Share

End of File.

You have put something in your script where it shouldn't be.

$$anonymous$$issing ; { } something to that effect.

Usually with a syntax error like this you may find that the line it points to is in fact NOT the problem.

Go through from beginning of your script checking all ; and making sure all ( have a ) and { have a } And that you have used , and . where they are needed.

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Brent Taylor · Oct 02, 2010 at 08:22 AM

Without actually showing us the code we can't tell you precisely what the problem is. However, "EOF" stands for "End Of File". Assuming you're using Javascript or C#, this error is usually thrown when you've forgotten an ending curly brace for a block of code.

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
-1

Answer by goodymic · Sep 24, 2013 at 11:53 AM

i am making a script for melee in my game. and i used this code:

 #pragma strict
 
 var TheDammage : int = 50;
 var Distance : float;
 
 function Update () 
 {
    if (Input.GetButtonDown("Fire!"))
    {
        var hit : RaycastHit;
        if (Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward, hit))
        )
            Distance = hit.distance;
            hit.transform.SendMessage("ApplyDammage", TheDammage, SendMessageOptions.DontRequireReceiver); 
        }
     }
 }


but it says i am missing eof what should i do

Comment
Add comment · Show 4 · 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 Mamul · Oct 04, 2013 at 06:37 AM 0
Share

You need to remove the last curly brace.

avatar image goodymic · Oct 14, 2013 at 06:26 AM 0
Share

but at this bit.

hit.transform.Send$$anonymous$$essage("ApplyDammage"), TheDamage, Send$$anonymous$$essageOptions.DontRequireReceiver);

it says Unexpected token:,.(BCE0043)

avatar image meat5000 ♦ · Oct 14, 2013 at 08:25 AM 0
Share

Posting Question as answer AND on someone elses QA? Not good man.

avatar image MapacheX · Mar 09, 2014 at 07:07 AM 0
Share

on your 9th line it needs to be open curly bracket

avatar image
0
Wiki

Answer by kuntzg · Mar 07, 2014 at 08:39 PM

On line 60 it says expecting EOF found else Help!!@

var normalSpeed:float=6.0; private var speed:float=normalSpeed; var runSpeed:float=12.0; private var jumpSpeed:float=speed*1.7; var gravity:float=20.0; private var walkTime:int=0; private var moveDirection:Vector3=Vector3.zero; static var grounded:boolean=false; private var controller:CharacterController; 10. private var flags:CollisionFlags;

function Start(){ animation.wrapMode=WrapMode.Loop; animation["run"].layer=-1; animation["walk"].layer=-1; animation["idle"].layer=-1; animation.SyncLayer(-1);

animation["jump"].layer=10; 20.animation["jump"].wrapMode=WrapMode.Once; animation.SyncLayer(10);

animation.Stop(); animation.Play("idle");

}

function FixedUpdate(){ 30. if(grounded);{ moveDirection=new Vector3(Input.GetAxis("Horizontal"),0,0); moveDirection*=speed; if(Input.GetButton("Jump")){ moveDirection.y=jumpSpeed; animation.CrossFade("jump");

  }
  
 

40.}

moveDirection.y-=gravity*Time.deltaTime; conroller=GetComponent(CharecterController); flags=controller.Move(moveDirection*Time.delta.Time);

ground=(flags & CollisionFlags.CollidedBelow)!=0;

if(Input.GetAxis("Horizontal")>.2(Input.GetAxis("Horizontal")<-.2)) if(walkTime>40){ 50. animation.CrossFade("run"); speed=runSpeed; }else{ walkTime++; animation.CrossFade("walk"); speed=normalSpeed; } jumpSpeed=speed*1.7;

  1.     }else{
         walkTime=0;
         animation.CrossFade("idle");
         } 
         
                                          
                                                                                                            
    
    
  2. @script RequireComponent(CharacterController)

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



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

BCE0044: expecting EOF, found }` error In my scripy 2 Answers

Error BCE0044 plz help 0 Answers

Errors in Vector2 variables 1 Answer

"BCE0044 Expecting EOF,found '{'. 1 Answer

Keep KGetting this error please help I dont know what to do 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges