|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
cvi001 How do I cheat? Reputation: 0
Joined: 11 Oct 2019 Posts: 3
|
Posted: Fri Oct 11, 2019 12:46 am Post subject: A Problem about Memory Address Offset(Perfect solution) |
|
|
Code: |
function MyScan777()
//--.......Some unimportant code
Scan.firstScan(soExactValue, vtGrouped, rtExtremerounded, "4:1013 4:1 4:1067450368", "", StartAddress, EndAddress, "", fsmAligned, "4", false, false, false, false);
local addrList = getAddressList();
local result = MyScan777();
local count = result.getCount();
for i=0, count-1, 1 do
//+++++Important issues++++++++
local addr = result.getAddress(i);
//--local addr_1 = [addr + 0x00000004];//This is an incorrect expression.And it's my problem
writeFloat(addr_1,0.4);
//--local addr_2 = [addr + 0x00000008];//like addr_1
writeFloat(addr_2,0.8);
//------Important issues--------
end
//Memory state:
//4DFF0000 1013 --addr Pointing here
//4DFF0004 1
//4DFF0008 1067450368 --Need addr_1 to point here
//4DFF000C 1067450368 --Need addr_2 to point here
|
Who can help me? [/code]
Last edited by cvi001 on Fri Oct 11, 2019 8:36 pm; edited 3 times in total |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Fri Oct 11, 2019 7:14 am Post subject: Re: A Syntax Problem about Memory Address Offset |
|
|
Code: |
...
writeFloat(addr+0x4, 0.4)
writeFloat(addr+0x8, 0.8)
...
|
_________________
|
|
Back to top |
|
|
cvi001 How do I cheat? Reputation: 0
Joined: 11 Oct 2019 Posts: 3
|
Posted: Fri Oct 11, 2019 7:57 am Post subject: Re: A Syntax Problem about Memory Address Offset |
|
|
mgr.inz.Player wrote: | Code: |
...
writeFloat(addr+0x4, 0.4)
writeFloat(addr+0x8, 0.8)
...
|
|
I‘m sorry my friend,It's not working.But you got the point!
This variable addr does store the address. addr == "4DFF0000"
but it's a string, not a number.so.....
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Fri Oct 11, 2019 11:03 am Post subject: |
|
|
Code: | ...
local addr = tonumber(result.getAddress(i),16)
...
writeFloat(addr+0x4, 0.4)
writeFloat(addr+0x8, 0.8)
... |
_________________
|
|
Back to top |
|
|
cvi001 How do I cheat? Reputation: 0
Joined: 11 Oct 2019 Posts: 3
|
Posted: Fri Oct 11, 2019 1:41 pm Post subject: |
|
|
mgr.inz.Player wrote: | Code: | ...
local addr = tonumber(result.getAddress(i),16)
...
writeFloat(addr+0x4, 0.4)
writeFloat(addr+0x8, 0.8)
... |
|
Yah!! you found the right way.Amazing...
"tonumber(string,16)" solved all the problems.
Code: |
writeFloat(addr+0x4, 0.4) -> writeFloat("addr+0x4", 0.4)
|
!!!!Thank you !!!!
|
|
Back to top |
|
|
|
|
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
|
|