gamjadory Cheater Reputation: 0
Joined: 04 Dec 2011 Posts: 27
|
Posted: Mon Jan 15, 2018 9:24 am Post subject: [Q] Lua Hotkey error |
|
|
I Made a Lua script
'Execute Script' Button click is normally execute.
But, press NUMPAD 1 key is print error message as follow.
"Error:attempt to call a nil value"
script is as follow
Code: |
function bossHP2()
local valA = 825789067226893
--local valB = 1806639338777377
ms=createMemScan()
memscan_firstScan(ms, soExactValue, vtQword, rtRounded, valA, "", 0x0000000001200000, 0x7fffffffffffffff, "", fsmAligned, 4, false, false, false, true) --change the last true to false if you do not wish case sensitivity
memscan_waitTillDone(ms)
--get the result of the scans
fl=createFoundList(ms)
foundlist_initialize(fl)
local count=foundlist_getCount(fl)
if (count>0) then
local saddress=foundlist_getAddress(fl, 0) --get the first address
writeQword(saddress, 1)
else
print("No addresses found")
end
--cleanup
object_destroy(fl)
object_destroy(ms)
end
createHotkey(bossHP2(),VK_NUMPAD1)
|
|
|