- Home /
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
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.
Your answer
![](https://koobas.hobune.stream/wayback/20220613071156im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
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