Posted: Sun Dec 06, 2020 1:43 pm Post subject: Lua Timer Syntax Error
Hello i'm semi new to Cheat Engine and started looking into LUA scripting a day or so ago. Alotugh i'm a bit over my head here i found a thread called
"send key inputs at specific pointer value" with code on how to send a button input when a pointer's value reaches a specific value. I copied this code and modified it to fit my own adress but i'm getting a syntax error i don't know how to deal with.
Code:
local timer = createTimer(getMainForm())
timer.Interval = 100
timer.OnTimer = function(timer)
value=tonumber(AddressList.getMemoryRecordByDescription('p2_attack_type').Value)
if Value == 1
then
keyDown(0x41)
Sleep 100
keyUp (0x41)
end
The error seems to be related to the KeyDown function but i can't really pinpoint what it wants, i'd love some pointers or resources on how to figure this out, thank you.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum