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 


readFloat function not get value from memory

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
iykkim
Newbie cheater
Reputation: 0

Joined: 13 Jul 2014
Posts: 19

PostPosted: Tue Nov 04, 2014 9:44 pm    Post subject: readFloat function not get value from memory Reply with quote

Hi.
I have a problem with readFloat lua function.
I'm trying to make a simple hotkey script that is doing location pointer value change from other pointer values when specific key pressed by lua script so I added at very first before the "--TRAINERGENERATORSTART--" sentence in lua script cheat table as below,

Code:

local pX=0
local pY=0
local pZ=0

function jumpAim()
         pX=readFloat("[[[[[Disrupt_b64.dll+03AAF828]+30]+78]+90]+3d0")
         pY=readFloat("[[[[[Disrupt_b64.dll+03AAF828]+30]+78]+90]+3d4")
         pZ=readFloat("[[[[[Disrupt_b64.dll+03AAF828]+30]+78]+90]+3d8")
         writeFloat("[[[[[Disrupt_b64.dll+03B30910]+130]+38]+60]+2a8]+1c0",pX)
         writeFloat("[[[[[Disrupt_b64.dll+03B30910]+130]+38]+60]+2a8]+1c4",pY)
         writeFloat("[[[[[Disrupt_b64.dll+03B30910]+130]+38]+60]+2a8]+1c8",pZ)
end

createHotkey("jumpAim",VK_F8)


But readFloat function didn't get any value and return nothing when I press F8 key.
I added disrupt_b64.dll file in table and tried but it was same.
I'm using CE v6.4.
Please let me know to make run this simple script and thanks in advance to all of you who leave message to this thread.
Code:


Last edited by iykkim on Wed Nov 05, 2014 12:13 am; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25287
Location: The netherlands

PostPosted: Tue Nov 04, 2014 10:35 pm    Post subject: Reply with quote

Code:

[[[[[Disrupt_b64.dll+03AAF828]+30]+78]+90]+3d0
12345                        5   4   3   2


you have one [ too many

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
iykkim
Newbie cheater
Reputation: 0

Joined: 13 Jul 2014
Posts: 19

PostPosted: Wed Nov 05, 2014 12:11 am    Post subject: Reply with quote

Ah, I missed to erase first one when I write this thread. thanks for quick answer.
But with the corrected code, it's still has same problem as I mentioned...
readFloat not getting any value. Sad


< Update >
Good news!
I solved this by other method.
Below is the working code that I was intended to do.

Code:

reinitializeSymbolhandler()
addresslist=getAddressList()

local pX=0
local pY=0
local pZ=0

function jumpAim()
         pX=addresslist.getMemoryRecord(22).getValue()
         pY=addresslist.getMemoryRecord(23).getValue()
         pZ=addresslist.getMemoryRecord(24).getValue()
         addresslist.getMemoryRecord(12).setValue(pX)
         addresslist.getMemoryRecord(13).setValue(pY)
         addresslist.getMemoryRecord(14).setValue(pZ)
end

createHotkey("jumpAim",VK_F8)


I get hint to doing this method from the thread, http://forum.cheatengine.org/viewtopic.php?t=576903

The numbers for getMemoryRecord is cheat list of my table countings.
If someone need the 5th cheat list value then it is 4 because the counting start from 0.

By the way, I still have no idea about why readFloat and writeFloat is not working properly.
Anyway thanks to Dark Byte and JRagen. Very Happy
Back to top
View user's profile Send private message
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