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
0
Question by Babilin · Aug 13, 2010 at 09:28 PM · c#syntax-errorcs0246

script ( compile error) (script is in C#)

ok so i was following the unity multiuser tutorial.

and i followed there link : http://virtualautonomy.com/blog/index.php/2009/12/31/unity-3d-a-quick-and-easy-guide-to-creat

they give you a file with things extracted from the sfs island demo.

sadly when i try to import the scripts i get an error when i try to add a script to an object

the error states

Can't add script behavior *. You need to fix all compie errors in all scripts first.

so then i downloaded the sfs demo and extracted the files my self. In the demo the scripts run fine but when i import the scripts into my own game i get the same error,

in the error console i get one error from a script

here is where the error happens

public class NetworkTransformReceiver : MonoBehaviour {

public float yAdjust = 0.0f; // Ajust y position when synchronizing the local and remote models. public float interpolationPeriod = 0.1f; // This value should be equal to the sendingPerion value of the Sender script

private bool receiveMode = false; private NetworkTransform lastState; // Last received transform state private NetworkTransform interpolateTo = null; // Last state we interpolate to in receiving mode. private NetworkTransform interpolateFrom; // Point from which to start interpolation

private int interpolationPoint = 0; // Current interpolation point private int maxInterpolationPoints = 0; // Maximum number of interpolation points; private float interpolationDelta = 0; // Delta value by which interpolate

private FPSStorage fpsStorage; private Queue queue = new Queue(); // Queue to store transform states for interpolations

// We call it on remote player to start receiving his transform void StartReceiving() { lastState = new NetworkTransform(this.gameObject);
fpsStorage = GameObject.Find(" FPS").GetComponent(typeof(FPSStorage)) as FPSStorage; receiveMode = true; }

void Update() { if (receiveMode) { InterpolateTransform(); } }

it says in the console

NetworkTransformReceiver.cs(22,17): error CS0246: The type or namespace name `FPSStorage' could not be found. Are you missing a using directive or an assembly reference?

now sense im not a scripter i dont know exactly what it means . i hope some one can tell me how to fix this problem

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by _Petroz · Aug 14, 2010 at 10:53 AM

The type or namespace name `FPSStorage' could not be found.

This error means the compiler couldn't resolve the class 'FPSStorage'. That class is probably defined in a separate script, you need to include that script as well. The name of the script that you are missing is probably FPSStorage.cs.

Comment
Add comment · Show 1 · 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 Babilin · Aug 15, 2010 at 11:10 PM 0
Share

thank you so so much!!!

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

No one has followed this question yet.

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

health bar script error 1 Answer

Compiler errors? 2 Answers

error CS0246: The type or namespace name `rect' could not be found. 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