@givirus its because of your script logic, maybe you dont call the function? OR you dont have proper error handling which results into certain parts of your script being skipped since they are inside an if statement. I encountered this problem many times in the past, you will need to handle errors and it'll will be most likely fixed, for the purpose of debugging you can use the "Log" function at several points to see where it will print it.
How to change the value of a variable in the script itself.
-
there's a too long didn't read version in the end:
My script uses an account on a website to do something but then after a while this account becomes useless and I've incorporated an if condition for this that calls a function that creates another account and continue the script.
But the problem is, when the thread restarts everytime it first tries to login with the useless account then create a new one, and so the script creates an account everytime it runs instead of using one account until a certain condition is fulfilled then make a new one and replace the variable with the new one.
TL;DR: how do I change the value of a variable in an action in my script?


and this is the end of Create_New_Account function

So what I want is to use the old account until it becomes useless which will trigger the formation of a new account that I want to replace the "old account" value of the variable "account" with the variable "tempmail" that I create in the function "Create_New_Account"
Basically this function changes the variable in this thread only but once a new thread is started it'll use old account again. Hope I got my point across!