✅ i am having trubble whit a tutorial how to fix this

No description
44 Replies
jcotton42
jcotton422d ago
m_StickInput is an object, per the error message.
SIproteuz69
SIproteuz69OP2d ago
ty but i still dont know how to fix
jcotton42
jcotton422d ago
Look back at the tutorial code, how did they declare m_StickInput?
SIproteuz69
SIproteuz69OP2d ago
i am looking att the code but is the same
jcotton42
jcotton422d ago
Can you share that $code here?
MODiX
MODiX2d ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
jcotton42
jcotton422d ago
(A screenshot is fine if you’re following a video)
SIproteuz69
SIproteuz69OP2d ago
yes
SIproteuz69
SIproteuz69OP2d ago
No description
SIproteuz69
SIproteuz69OP2d ago
the video where do i put the screenshot?
Angius
Angius2d ago
Well, seemingly, you just put it here What's more important than how m_StickInput is used in the video, though, is how it is declared
jcotton42
jcotton422d ago
We’re looking for the declaration. The line outside the method. In your code it’s something like object m_Stickinput; (maybe a private in there too) we need to see how the tutorial has it.
SIproteuz69
SIproteuz69OP2d ago
whant me to send a screenshot or video link?
jcotton42
jcotton422d ago
Screenshot. There’s no point in my searching through the video for a specific moment when you’re more likely to know when it is.
SIproteuz69
SIproteuz69OP2d ago
No description
Angius
Angius2d ago
For reference, a declaration of something is where that thing is declared Not where it's used
class Foo
{
private int _bar = 69; // <-- declaration of a field
public string Baz { get; set; } // <-- declaration of a property
public const float Quz = 1.1; // <-- declaration of a const

public void Do() // <-- declaration of a method
{
var x = 0; // <-- declaration of a local variable
}
}
class Foo
{
private int _bar = 69; // <-- declaration of a field
public string Baz { get; set; } // <-- declaration of a property
public const float Quz = 1.1; // <-- declaration of a const

public void Do() // <-- declaration of a method
{
var x = 0; // <-- declaration of a local variable
}
}
SIproteuz69
SIproteuz69OP2d ago
so my problem is that is private void
Angius
Angius2d ago
m_StickInput is a private void method?
SIproteuz69
SIproteuz69OP2d ago
idk
Angius
Angius2d ago
Well, find out It's declared, somewhere, with the type object That is, according to the error, not the type it should have Figure out what type the tutorial used Fix your code to use the same type
SIproteuz69
SIproteuz69OP2d ago
he uses privet
Angius
Angius2d ago
"Priviet" is how you say "hello" in Russian It's not a type
SIproteuz69
SIproteuz69OP2d ago
i am swedish and i have dislexia sorry
Angius
Angius2d ago
private is a visibility modifier As is public or internal You want to know the type
SIproteuz69
SIproteuz69OP2d ago
yeah and i dont understand the error code public class Person { private string _name; public Person(string name) => _name = name; // Person has one method, called WriteName. public void WriteName() { System.Console.WriteLine(_name); } } public class Program { public static void Main() { var p = new Person("PersonName"); // The following call fails because Person does not have // a method called DisplayName. p.DisplayName(); // CS1061 } } is what microsoft gives me as a examble
Keswiik
Keswiik2d ago
Link to the example on the MS site, please, because that snippet has you trying to call a method that does not exist. I personally think you need to work through the $helloworld examples and the MS C# tutorials because it feels like you do not have a solid understanding of c# basics
Keswiik
Keswiik2d ago
I would go through the above courses before you jump into random YT tutorials, because without understanding the fundamentals you're setting yourself up for a lot of frustration when things don't work
SIproteuz69
SIproteuz69OP2d ago
ok
SIproteuz69
SIproteuz69OP2d ago
the link to the error code i can get banned for that right:distilld_look:
Keswiik
Keswiik2d ago
Most people here do not memorize compiler error codes FWIW Banned for what...?
SIproteuz69
SIproteuz69OP2d ago
sending links scams and stuff
Keswiik
Keswiik2d ago
As long as you're not sending links to sketchy sites and asking people to download stuff nobody will care. I regularly link to the MS docs
SIproteuz69
SIproteuz69OP2d ago
ok good
Angius
Angius2d ago
Dude We keep repeating Over and over and over and over and over again Where the error is What you have to do to verify it What you have to do to fix it
Angius
Angius2d ago
The error is clear
No description
Angius
Angius2d ago
m_StickInput has a type Some type I don't know what type That type does not have the .ReadValue() method It does not exist None Nada Zero Nobody has ever made it and nobody ever will In none of the multiverses does this method exist The way to check what's wrong is to see where m_StickInput is declared Not where it's used Not where it's referenced Not where it got married Not where it went for a honeymoon Where it's declared The code in the tutorial has no such error No error at all Whatsoever So, the tutorial code has m_StickInput declared with the correct type Watch the tutorial See where m_StickInput is declared in the tutorial code Declared And use the same type for your m_StickInput Please I beg of you Just listen to the advice Put it in a text-to-speech software so it reads it aloud for you or something That said, I agree with Ded here You can barely crawl and you decided to climb the K2 Start from the basics Like "what is a declaration"
SIproteuz69
SIproteuz69OP2d ago
sorry but how to check value
Angius
Angius2d ago
At no point has anybody ever mentioned checking a value in this conversation
SIproteuz69
SIproteuz69OP2d ago
no dw about it i did it it is fixt Sorry if i disturb you but i got a new problem
Angius
Angius2d ago
Sure
SIproteuz69
SIproteuz69OP2d ago
i fixed it
deem
deemthis hour
LOL

Did you find this page helpful?