That helped a lot. I thought because I'm parsing value to parameters I don't need global variables. But, is it possible to call another async function inside an async function?
How to use seperate resources for each thread?
-
Hi. I created a script that needs to type text on a website and send it, then repeat infite times.
I created a txt file resource where i put in each line a message it has to send, and then created a loop so it never stops and goes through the message in order. So the resource files is like that:message 1
message 2
message 3
message 4
message 5It works perfectly on single thread BUT, when i use 2 or more threads, it doesnt. I want every thread to go through all messages in order (1,2,3,4,5). But instead it goes like that:
thread 1 - message 1
thread 2 - message 2
thread 1 - message 3
thread 2 - message 4
thread 1 - message 5It causes me errors cause i have a bot set up to loop when it reaches message 5, but as u can see thread 2 never reaches it and it makes it randomly restart the thread, which i dont want.
I could fix it if i could somehow make all threads use this one resource in order no matter what other threads did OR somehow use seperate resources for each thread.
Can someone help me solve it?