Posted: Sat Apr 08, 2023 11:09 am Post subject: Change value of static adress with checkbox
Hello!
Im trying to change the value of a static address with a checkbox in my trainer, however without any success. Is there any obvious issues with this code?
Im not getting any errors but also no result
Code:
function CETrainer_CECheckbox2Change(sender)
if (CETrainer.CECheckbox2.State==cbChecked)then
writeFloat(0x0080CFFD, 1)
else
writeFloat(0x0080CFFD, 2)
end
end
An unaligned float? I'd guess that's the wrong address. Static addresses should be something like "game.exe+1234" anyway.
If you're certain that's fine, make sure the OnChange property of the checkbox is that function. (execute the main Lua script to define that function and assign it in the forum designer) _________________
I don't know where I'm going, but I'll figure it out when I get there.
CETrainer.CECheckbox2.OnChange=function(sender)
val = readFloat("0080CFFD")
print(val)
if CETrainer.CECheckbox2.Checked==true then
writeFloat("0080CFFD", 1)
else
writeFloat("0080CFFD", 2)
end
end
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