Hello I have been testing Unity3d with JavaScript for a couple of months,no problem Now I am tring C# I have a robot with a CharacterController attached I declare static CharacterController controller; void Start () { controller = (CharacterController)GetComponent(typeof(CharacterController)); } CollisionFlags flags = controller.Move(....); but I get the error message Expression denotes a "Type" where a "variable" "value" or "Method group" was expected What shall I do ? Thanks in advance for support
There doesn't seem to be anything wrong with the code you've posted. Can you post the whole script and mention which line is causing the error?
Thanks I quoted the whole script I have created a C sharp script and I wrote just these few lines of code The line causing the error is CollisionFlags flags = controller.Move(....); If I switch to a JavaScript with var controller : CharacterController = GetComponent(CharacterController); it works well