hmmm , the Source Code looks funny for me.
So you create a new Thread , start the thread and wait for 1000 ms with the current function.
After this you check the bottrap variable.
Inside of the bottrapdetect() function do you change the bottrap variable.
So why a separate thread for this ?
I would use here a normal function call.
Threads are always a source of many problems :)
Hint: Set your Threads as a background Thread and it will end when you close the main window.
----
A crash after x min or kills could be a sign that you have a resouce problem.
Many function use handles and they are limited.
So if you reserve something and don't release it again , will your programm cash after some time.
Code:
Thread MyNewThread2 = new Thread(new ThreadStart(bottrapdetect)); MyNewThread2.Start(); Thread.Sleep(1000); if (variables.bottrap == 1)
After this you check the bottrap variable.
Inside of the bottrapdetect() function do you change the bottrap variable.
So why a separate thread for this ?
I would use here a normal function call.
Threads are always a source of many problems :)
Hint: Set your Threads as a background Thread and it will end when you close the main window.
----
A crash after x min or kills could be a sign that you have a resouce problem.
Many function use handles and they are limited.
So if you reserve something and don't release it again , will your programm cash after some time.