❔ Error idk how to fix
can someone please look thought my code and time me why i get this error
33 Replies
1) you need to provide more detail
2) nobody is going to debug your entire project for you
3) nobody is going to download and open a mystery zip file
im not asking for someone to debug the enitre project
i have no idea how to fix the error its giving me
you didn't actually share an error
just the line it's breaking on
thats all its giving me XD
it's not
yea it is
StackOverflowException
is the error
there should also be a stack trace showing what code lead to the errorThis is just a wild guess so take it with a sizeable amount of salt but in C# stack overflows are frequently caused by an infinite recursion somewhere
so if you can think of somewhere in your code where that may have happened, examine it closely
i did i cant really see anything
thos are my 2 scripts
idk where that is
you have infinite recursion
your Form1 creates a Settings which creates a Form1 which creates a Settings and so on until your program crashes
I am big 🧠
so how would i fix that
im still new to C#
XD
you need to get rid of
Form1 form1 = new Form1();
in your Settings class
specifically the new Form1()
part
you probably want to reference the original form that opened, not create a new onean image with no context does nothing for me
this also does nothing for me
use your words
nvm
i get this when i press there settings button
why do you think that is?
because im tired
i see it
works now
and now i get this when i check the on top button
my brain dose not work rn
maybe sleep on it
please just help me
i mean idk how to do it and im tired
it's the exact same problem you just had with the other piece of code
the problem with the other code was i didnt put a "1" but when i do it with this script it gives an error
you should probably start with a simpler project
something that doesn't involve a GUI framework that's doing things behind the scenes and confusing you
maybe your right
ill just delete the project
dont delete, put it aside and come back later when you know more
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.