I wanted to create a thread in a loop so I took the script formula from the forum, but even when I paste the clean code to cheat engine shows error about global atimer, what do I do? I would like the script to run in a loop after selecting active, and to stop when unchecked.
cheat engine 7.2
Loop theard lua
-
- Expert Cheater
- Posts: 852
- Joined: Fri Oct 12, 2018 10:25 pm
- Reputation: 896
Re: Loop theard lua
Remove "local aTimer = nil" and it'll work.
I'm not 100% sure of how it works, but the destroy is taking the local variable instead of the one that has the timer. I guess that local variables have priority over global ones when it's in the same script? So either remove the entire line, which pretty much does nothing to begin with, or remove the "local" from it.
I'm not 100% sure of how it works, but the destroy is taking the local variable instead of the one that has the timer. I guess that local variables have priority over global ones when it's in the same script? So either remove the entire line, which pretty much does nothing to begin with, or remove the "local" from it.
Re: Loop theard lua
Local variables worked if they were in the same script. But one of the CE updates seems to have changed this so now if you want access to a variable from the enable section in the disable section you need to make it global. Since you don't need it to be a local variable just delete the local variable declaration as GreenHouse said, because it makes it a local only accessible in the enable section.
Who is online
Users browsing this forum: No registered users