C
C#16mo ago
Cheetah

Ok so i DID NOT add hello world to my code but it still appears

my code for some ungodly reason has decided to not use my code and use a previous code when i run and i dontt tknow why pls help me
35 Replies
Anchy
Anchy16mo ago
probably keep all your issues to 1 thread it doesnt look like ur debugging so are you manually running the file?
Cheetah
CheetahOP16mo ago
ok like just edit the hread
Anchy
Anchy16mo ago
if so you need to recompile
Angius
Angius16mo ago
F5, IIRC Or click the green arrow That's how you should run it in VS
Cheetah
CheetahOP16mo ago
i use ctrl + f5 to do it
Angius
Angius16mo ago
That seems fine, then
Cheetah
CheetahOP16mo ago
but it still isnttt the code i have tthere
Angius
Angius16mo ago
Yes, that part is not fine
Angius
Angius16mo ago
I'm wondering about those errors:
Angius
Angius16mo ago
Can you try restarting VS and see if those errors, and your issue, persist?
Cheetah
CheetahOP16mo ago
i restarted it a sec ago the errors went away the issue still there
Angius
Angius16mo ago
Huh Sometimes, when VS cannot compile the current version for some reason, it will run the last version that did compile
Anchy
Anchy16mo ago
show your program.cs
Angius
Angius16mo ago
But the code looks like it should compile just fine
Anchy
Anchy16mo ago
in ur last screenshot in the last thread it looks like the code does exactly that
Angius
Angius16mo ago
Second screenshot
Anchy
Anchy16mo ago
o
Angius
Angius16mo ago
So, what version of .NET is this project using?
Anchy
Anchy16mo ago
int Number++; does that even compile
Angius
Angius16mo ago
Ah, it probably does not
Cheetah
CheetahOP16mo ago
idk ive tried withtout intt and it worked and now itt dontt anymore
Angius
Angius16mo ago
Yeah, that's not valid code
Anchy
Anchy16mo ago
so its uses last compile
Cheetah
CheetahOP16mo ago
int
Angius
Angius16mo ago
It's a redeclaration of the variable
Cheetah
CheetahOP16mo ago
so i need to puttt itt somewhere else or just remove it
Anchy
Anchy16mo ago
remove the type specifier
Angius
Angius16mo ago
Keep just one declaration, as you have it int Number = 0; But when you use it, don't specify the type
Cheetah
CheetahOP16mo ago
hold on
Angius
Angius16mo ago
Just do Number++
Cheetah
CheetahOP16mo ago
ok so ok but idk if it was when i reset it but the code wentt to what was running so idk what happened i forgot to check code agian after restarting visual sttudio ok itts fixed
Anchy
Anchy16mo ago
probably repair your IDE as it would have told you the issue if it wasnt broken
Angius
Angius16mo ago
Good point, it should be lit up in red on a variable redeclaration
JenyaRostov
JenyaRostov16mo ago
doesn't visual studio prompt you to run last successfully compiled code
blueberriesiftheywerecats
Because you have error and you activated run last compiled code feature
Want results from more Discord servers?
Add your server