C
C#7mo ago
Nicholas

Help with counter

https://paste.ofcode.org/SD2dfetkQpeUsDmrMVbDab not sure why its not working thanks ❤️
26 Replies
Angius
Angius7mo ago
Define "not working" Does the counter not increment? Does it crash? Is the output not what it should be?
Nicholas
NicholasOP7mo ago
yes everytime I run the code it doesn't count up and just closes
Angius
Angius7mo ago
Add Console.ReadLine() at the very end VS just closes the console when the program finishes running, by default
Nicholas
NicholasOP7mo ago
i got an error tho
Angius
Angius7mo ago
It can be changed somewhere in the settings, IIRC, but a Console.ReadLine() or even a Console.Read() is a quick way to basically add "press any key to continue"
Nicholas
NicholasOP7mo ago
No description
Angius
Angius7mo ago
What error? ;
Nicholas
NicholasOP7mo ago
yeah m dumb
Angius
Angius7mo ago
Now it will wait for Enter before closing
Nicholas
NicholasOP7mo ago
m still didn't work that's odd it counted to one then closed
Angius
Angius7mo ago
Try Tools->Options->Debugging->Automatically close the console Disable that
Nicholas
NicholasOP7mo ago
under which sub tab is it in
Nicholas
NicholasOP7mo ago
this?
No description
Angius
Angius7mo ago
Yeah I see it's disabled already
Nicholas
NicholasOP7mo ago
yepp
Angius
Angius7mo ago
Try runnin without debug Ctrl+F5 instead of F5
Nicholas
NicholasOP7mo ago
I just click the play button i tried urs still closed again that's odd
Angius
Angius7mo ago
Aight Try Tools -> Options -> Project and Solutions -> Build and run Set On run, when build or deployment errors occur... to Do not launch
Nicholas
NicholasOP7mo ago
I did still closed
Nicholas
NicholasOP7mo ago
No description
Angius
Angius7mo ago
Huh Try .Read() instead of .ReadLine()...?
Nicholas
NicholasOP7mo ago
Got some help and it worked thanks!
Pobiega
Pobiega7mo ago
I'm 99% sure you have "run latest build if compilation failed" turned on which is just a terrible setting that should be removed, imho
JimmahDean
JimmahDean7mo ago
mine doesn't and i'm pretty sure i didn't change the setting?
Angius
Angius7mo ago
Maybe it's no longer enabled by default
deem
deem7mo ago
@crayy
Want results from more Discord servers?
Add your server