|
hey guys i was wondering if you could clear something up for me. Basically its for the following lines below i would be really great full if you could help me :) Line 1 Code in Java :
Code In C Sharp :
Now the question is in my Java script i created a variable on the top called "var OriginalRotation" and defined it as a Quaternion. Now in the Java Script you can see i have used the OriginalRotation and then defined a XQuaternion with in it and then set the AngleAxis. Now i tried the same in C but it would not allow me to place the variable before it and then define the X angle. it gave me this message error code: Assets/FPSScripts/FpsMouseLookCSharp.cs(56,17): error CS0118: now why is that ???? Question 2: Jave code :
C sharp Code:
the question here is why is it that in java it allowed me to use static function and then the define the angles and the fallowed by the type it is which is float. but in C sharp i had to change this to the following line shown in the C sharp line of code. Why is this ? i would be really great full if someone could really answer this for me thank you very much in advance MCHALO :)
(comments are locked)
|
|
Hello, I believe both of your problems would be best answered if you got familiar with the C# syntax. Spend a few hours doing some simple online tutorial and I think you will avoid a lot of future problems like this. Short pointers to both problems: 1. In JS you define the type (a string in this example) of a variable by writing...
...where in C# you would simply write...
That's why your C# is giving an error, you are trying to use a wrong syntax. 2. Again, JS and C# use a different syntax. You simply write the same thing in a different way. Learning the basic syntax of C# is really easy and you can do it in an evening if you want to. Hope that helps, -T lol i know who to do that lol thanks any ways you helped :)
May 15 '11 at 01:12 AM
MC HALO
(comments are locked)
|

Google "Java is not JavaScript".
i know i cant be bother to write java script im sure people will understand