C
C#ā€¢12mo ago
ā–³ ok.zero

can somebody help me debug

tldr i donr know what my problem is but in unity i cant compile one of my player movement scrpts beacuse it is causing an error error: Assets\Scripts\comtrollers\HumanoidLandConroller.cs(39,2): error CS1513: } expected code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Humanoidlandcontroller : MonoBehaviour { Ridgidbody _ridgidbody = null; [SerialiseFeild] Humanoidlandimput _imput; vector3 _PlayerMoveImput = vector3.zero; [Header("movement")] [SerialiseFeild] float _movementMultiplier = 30.0f; private void Awake() { _ridgidbody = GetComponent<Ridgidbody>(); playermove(); _ridgidbody.AddRelativeForce(_PlayerMoveImput, ForceMode.Force); } private void FixedUpdate() { _PlayerMoveImput = GetMoveInput(); playermove(); _ridgidbody.AddRelativeForce(_PlayerMoveImput, ForceMode.Force); } private vector3 playermove() { return new vector3(_imput.MoveImput.x, 0.0, _imput.moveimput.y); } private void GetMoveInput() { _PlayerMoveImput = (new vector3(_PlayerMoveImput.x * _movementMultiplier * _ridgidbody.mass, _PlayerMoveImput.y, _PlayerMoveImput.z * _movementMultiplier * _ridgidbody.mass )); } notes: i dont have anything els to say about the issue thats all it is on the surface level
72 Replies
SG97
SG97ā€¢12mo ago
have you tried matching the braces { } ? on a sidenote, no need to get aggressive with the title
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
yeah the brackets look, fine ig
SG97
SG97ā€¢12mo ago
I think you have a typo, should be [SerializeField] you're missing the closing one on your class
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
where abouts?
SG97
SG97ā€¢12mo ago
where your class ends
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
uhhhh?
SG97
SG97ā€¢12mo ago
add one } after your GetMoveInput method
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
šŸ˜­ bro im confused allready
SG97
SG97ā€¢12mo ago
about what? every starting { should have a closing }
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
everything ur saying
cap5lut
cap5lutā€¢12mo ago
u basically have
public class Humanoidlandcontroller : MonoBehaviour
{
// other fields and methods
private void GetMoveInput()
{
// code
}
public class Humanoidlandcontroller : MonoBehaviour
{
// other fields and methods
private void GetMoveInput()
{
// code
}
see where its missing now?
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
before public class?
SG97
SG97ā€¢12mo ago
no
cap5lut
cap5lutā€¢12mo ago
like
}
public class Humanoidlandcontroller : MonoBehaviour
{
// other fields and methods
private void GetMoveInput()
{
// code
}
}
public class Humanoidlandcontroller : MonoBehaviour
{
// other fields and methods
private void GetMoveInput()
{
// code
}
? that would be incorrect
SG97
SG97ā€¢12mo ago
the methods belong to the Humanoidlandcontroller
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
šŸ˜­
SG97
SG97ā€¢12mo ago
have you been through the c# fundamentals?
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
no
SG97
SG97ā€¢12mo ago
I strongly suggest it before venturing into Unity
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
tbh this is code that i diddnt even write i frankenstined together i have extremelly limited progremming experiance šŸ˜­ šŸ˜­ šŸ˜­ i dont understand likr bro šŸ˜­
SG97
SG97ā€¢12mo ago
learning doesn't come easy there's hardly any learning involved if you just copy and paste stuff from the internet
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
everyone more experianced than me puts me down because of there shitty superiority complexes
cap5lut
cap5lutā€¢12mo ago
learning the fundamentals first will help u understand whats going on
SG97
SG97ā€¢12mo ago
^
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
it makes it hard to even be motivated to even learn or know where to learn from
SG97
SG97ā€¢12mo ago
if you're looking for a starting point, $helloworld
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
oh shut up with ur console.log sounding ass
SG97
SG97ā€¢12mo ago
come again?
cap5lut
cap5lutā€¢12mo ago
console.log is javascript, not c#
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
šŸ˜­
cap5lut
cap5lutā€¢12mo ago
and if u are refering to the $helloworld, thats just the bot tag to display that message
SG97
SG97ā€¢12mo ago
I can assure you, accepting help is way more fruitful than dismissing it
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
i start on courses and totorials but guess what after 5 minuets theres a pay wall everytime so i can only take in the begining šŸ˜­
SG97
SG97ā€¢12mo ago
there is no paywall
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
theres paywalls everywhere
SG97
SG97ā€¢12mo ago
with the link I provided, prove it
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
im talking about learning tools i cant read of of wiki and underastand THE PAYWALLS šŸ˜­
SG97
SG97ā€¢12mo ago
if you're not here to learn, I cannot help you
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
šŸ˜­
cap5lut
cap5lutā€¢12mo ago
so whats the problem with the provided links? as said there are no paywalls there
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
atleast help me fix my code i need this w please
SG97
SG97ā€¢12mo ago
I did and so did cap5lut
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
but like can u edit it the send me the code back?
SG97
SG97ā€¢12mo ago
no
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
please bro
cap5lut
cap5lutā€¢12mo ago
we dont spoonfeed solutions in here
SG97
SG97ā€¢12mo ago
this place is for learning, not spoonfeeding
cap5lut
cap5lutā€¢12mo ago
we help u reach the solution urself, but thats it
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
i want to learn but everyone els is such a dick, all high and mighty im not talking about this forum
SG97
SG97ā€¢12mo ago
aight, did you check the links?
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
ill check them out hx
SG97
SG97ā€¢12mo ago
perfect
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
should i learn java first? or pyth
SG97
SG97ā€¢12mo ago
no
cap5lut
cap5lutā€¢12mo ago
no stick to one language
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
how hard is c#
cap5lut
cap5lutā€¢12mo ago
easy
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
i only know batch not even a real languge šŸ˜­
cap5lut
cap5lutā€¢12mo ago
C# is a good language to start learning
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
ill try it out
cap5lut
cap5lutā€¢12mo ago
u can have a fulll range of stuff u can write with C# ranging from small CLI tools over GUI applications (Desktop and Mobile) to web applications and game development the only stuff u cant really do with c# itself is writing close-to-the-metal stuff, like hardware drivers or operation systems (and even there are approaches to get that working)
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
by system operations do u mean like directly executing windows processes kind of like batch????
cap5lut
cap5lutā€¢12mo ago
i said operation systems, not system operations, as in like windows itself ;p starting other processes, is just one to a couple of lines in C#
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
i aint building my own os wdym oh ok
cap5lut
cap5lutā€¢12mo ago
i was just talking about what u can possibly do with C#, not what u have to do
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
its almost 40 degrees outside ventalation is compleately broken
cap5lut
cap5lutā€¢12mo ago
im sitting in germany, its -8Ā°C rn, outside ;p
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
atleast ur not melting omg i allready fkced up writing hello world šŸ’€ TO MANY CHARICTERS IN LITERAL Console.WriteLine('Hello World!'); WHYYYYYYYYYYYYYYYYY yk what ill try again tomorrow im not cut out for this yk how many times since 2020 ive tried to learn
SG97
SG97ā€¢12mo ago
" is different to '
ā–³ ok.zero
ā–³ ok.zeroOPā€¢12mo ago
i swear i put double quotes yeah
Patrick
Patrickā€¢12mo ago
!warn @ā–³ ok.zero uncivil posts do it again and you're banned @ā–³ ok.zero šŸ™‚
Want results from more Discord servers?
Add your server