View previous topic :: View next topic |
Author |
Message |
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Wed Aug 23, 2017 4:50 pm Post subject: |
|
|
I don't suppose you're using the same name for the other timer?
It should be running, though it may just print an error like Error:Failure determining what [_stamms]+58 means (_stamms not defined) or Error:[string "local syntaxcheck,memrec=...
..."]:8: attempt to index a nil value (record with name '_stamms + 58' does not exist)...
If nothing else try running the lua code in the lua engine window instead of an AA script to verify that it works as expected there.
|
|
Back to top |
|
|
Zec Newbie cheater Reputation: 0
Joined: 02 Jul 2016 Posts: 17
|
Posted: Sat Aug 26, 2017 3:51 am Post subject: |
|
|
Thanks for helping.
When I activate my first AA script, _stamms is registered and works...
I changed my 2nd script to your suggestions and it runs in the lua engine and prints:
Quote: | tHolz ping
writeInteger address in decimal 2729195960
mem rec object address in decimal 021FCDF0 |
the memory address is being updated as planned. dec 2729195960 is correct.
the same code as a table entry does not work and also does not result in any lua output.
i used tHolz only for this timer name and fHolz only for this function.
my whole CT file is here, maybe you could take a look into it?
h**ps://paste.ee/p/3bwam (i am not allowed to post urls and also CTs should not be uploaded... please replace * with t.
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sat Aug 26, 2017 9:24 am Post subject: |
|
|
ah, it's marked as asynchronous. I remember a forum topic that mentioned that timers in asynchronous scripts don't ever get run for some reason, you should be able to use a thread however if there is some reason for that to be asynchronous.
quick example:
Code: | {$lua}
[ENABLE]
if syntaxCheck then return end
thethread = createThread(function(Thread)
while true do
if Thread.Terminated then break end -- breaks loops and allows function to end
sleep(500) -- interval
print(('%s %i says: hi!!!!'):format(os.clock(), memrec.id))
end
end)
[DISABLE]
thethread.terminate() |
|
|
Back to top |
|
|
Zec Newbie cheater Reputation: 0
Joined: 02 Jul 2016 Posts: 17
|
Posted: Mon Aug 28, 2017 1:18 pm Post subject: |
|
|
OMG, now it works! Thanks a lot. I would never thought that the asynchronous flag would have this side effect.
Thanks thanks thanks!
|
|
Back to top |
|
|
|