Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help Me pls....

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
bingo88
How do I cheat?
Reputation: 0

Joined: 23 Aug 2018
Posts: 9

PostPosted: Fri Oct 05, 2018 3:39 pm    Post subject: Help Me pls.... Reply with quote

Im use this scrypt

local find_this = "00 40 40 40 1E 00 00 00 5A";
local memscan = createMemScan()
local foundlist = createFoundList(memscan)
memscan.firstScan(soExactValue, vtByteArray, rtRounded, find_this, '', 0x500000000, 0x900000000, '+X', fsmNotAligned, '', true, true, false, false)
memscan.waitTillDone()
foundlist.initialize()
saved_values = {}
local value = foundlist.Value
local address = foundlist.Address
for i = 0, foundlist.Count - 1 do
saved_values[address[i]] = value[i]
end
local replace_with = '00 00 48 43';
for i in pairs(saved_values) do
writeInteger(i, replace_with)
end

why my aob not replace 00 00 48 43? but change 00 00 00 00...
what wrong in my scrypt?
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Fri Oct 05, 2018 5:19 pm    Post subject: Reply with quote

Why are you passing a string to "writeInteger", seems like it might take an integer.
Try it with "writeBytes":
Code:
...
local replace_bytes = { 0x00,  0x00, 0x48, 0x43 }
...
  writeBytes(i, replace_bytes)
...

_________________
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites