C
C#2mo ago
4_PUR3_GH05T

✅ 4 compiler errors..I need someone to help me fix this

for anyone that is willing to help, here is the code: using system.Collections; using system.Collections.Generic; using UnityEngine; public class PlayerCam : Monobehaviour { public class float sensX; public class float sensY; public Transform orientation; float xRotation; float yRotation; private void Start() { Cursor.lockstate = CursorLockMode.Locked; Cursor.visible = false; } private void Update() { // get mouse input float mouseX = Input.GetAxisRaw("Mouse X") * Time.deltaTime * sensX; float mouseY = Input.GetAxisRaw("Mouse Y") * Time.deltaTime * sensY; yRotation += mouseX; xRotation -= mouseY; } } you can check the compiler errors in the picture
No description
No description
No description
No description
11 Replies
Angius
Angius2mo ago
This is nonsensical
No description
Angius
Angius2mo ago
Which probably causes all the other problems all the way down
4_PUR3_GH05T
4_PUR3_GH05TOP2mo ago
So what is the solution?
Pobiega
Pobiega2mo ago
Learn the very very basics of C# syntax
Yesn't
Yesn't2mo ago
syntax error plus class float is not a thing learn to use the language properly
4_PUR3_GH05T
4_PUR3_GH05TOP2mo ago
Ok ok chill I’m new…I’m a transfer from C++ bcuz unity doesn’t work with C++ Can you like tell me what to put there? Should I put public float instead of public class float? Just searched up syntaxes And it gave me this
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
4_PUR3_GH05T
4_PUR3_GH05TOP2mo ago
Thank you
Yesn't
Yesn't2mo ago
C++ and C# syntax is of course very different that's fundamental to know but tebeco provided you with valuable stuff stick with em

Did you find this page helpful?