The question is answered, right answer was accepted
Enumaration error CS1025: Single-line comment or end-of-line expected
Hi. I was converting my code from Javascript to C#. The code works in JS and then I converted it to C# with no problem since I know both languages. However their are a few lines on my code where i do get error. These are the lines where I do and if statement with my enum. I don't know what the problem is since I did the enum according to how I saw it on the tutorial here. I don't know what the problem is and in Unity i keep getting the error referring to line 68:
Assets/Scripts/Car Control C#/Wheel.cs(68,0): error CS1025: Single-line comment or end-of-line expected
Please help I don't know what to do. Here's the code in question:
enum WheelKind { Steer , SteerAndMotor , Motor , JustAWheel}; //types of wheel
public WheelKind typeOfWheel; //Object of WheelKind
void FixedUpdate (){
#if UNITY_STANDALONE || UNITY WEBPLAYER
if (typeOfWheel == WheelKind.Motor || typeOfWheel == WheelKind.SteerAndMotor)
TorqueControle ();
if (typeOfWheel == WheelKind.Steer || typeOfWheel == WheelKind.SteerAndMotor)
SteerControle ();
#endif
if (handBreakable){
//HandBrake();
}
if(!carScript.braked){
Decellaration();
}
}
Thanks in advance.
RTF$$anonymous$$
Answer by jgodfrey · Jun 04, 2016 at 03:36 AM
I'd guess your problem is here:
#if UNITY_STANDALONE || UNITY WEBPLAYER
That should be:
#if UNITY_STANDALONE || UNITY_WEBPLAYER
Notice the missing "_" in UNITY_WEBPLAYER
Oh my God thank you. I can't believe I overlooked something so simple. When I read your response I did the biggest face-palm ever! Thanks!