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 


writeDouble

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

Joined: 22 May 2012
Posts: 26

PostPosted: Fri Jun 22, 2012 10:43 am    Post subject: writeDouble Reply with quote

need help about it
how to use it
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri Jun 22, 2012 8:03 pm    Post subject: Reply with quote

writeDouble(address, value)

You might have to use fullAccess(address,8) to make sure it's writable first

_________________
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
Firered
Cheater
Reputation: 0

Joined: 22 May 2012
Posts: 26

PostPosted: Sat Jun 23, 2012 1:46 am    Post subject: why not work? Reply with quote

My script is not working .. why?

----

Code:
answered


----


Last edited by Firered on Tue Jun 26, 2012 11:42 pm; edited 3 times in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sat Jun 23, 2012 10:53 am    Post subject: Reply with quote

how many addresses does your script find?
Print the addresses first

also, put fullAccess before writeDouble

_________________
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
Firered
Cheater
Reputation: 0

Joined: 22 May 2012
Posts: 26

PostPosted: Sat Jun 23, 2012 3:37 pm    Post subject: Reply with quote

looks:

Code:
answered


I caught one of the 6 addresses found to show: 01824760


Last edited by Firered on Tue Jun 26, 2012 11:42 pm; edited 2 times in total
Back to top
View user's profile Send private message
Firered
Cheater
Reputation: 0

Joined: 22 May 2012
Posts: 26

PostPosted: Sun Jun 24, 2012 5:39 pm    Post subject: Reply with quote

soValueBetween

Last edited by Firered on Tue Jun 26, 2012 11:43 pm; 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: 25281
Location: The netherlands

PostPosted: Sun Jun 24, 2012 6:06 pm    Post subject: Reply with quote

Your FirstScanValueBetween() function doesn't seem to return anything, so any operation based on the return value won't work

Also, why do you call memoryrecord_setType ?

Edit: Use indentation, I can hardly read the code.
Anyho, it seems you're calling FirstScanValueBetween from inside FirstScanValueBetweenwhich might not be such a good idea

_________________
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
Firered
Cheater
Reputation: 0

Joined: 22 May 2012
Posts: 26

PostPosted: Sun Jun 24, 2012 7:20 pm    Post subject: Reply with quote

still not working =/

Code:
function FirstScanValueBetween(input1, input2)

  local result_table = {}


  local memScan = createMemScan()
  local fl      = createFoundList(memScan)

  memscan_firstScan(memScan,soValueBetween, vtDouble, rtTruncated,input1, input2,
                    '0', '7fffffff', "+W-C", fsmAligned ,"4" , false , true, false, false)

  memscan_waitTillDone(memScan)
  foundlist_initialize(fl)

  local count = foundlist_getCount(fl)

  if count > 0 then
    for i=0,count-1 do
      result_table[i+1] = foundlist_getAddress(fl,i)
    end
  end

  object_destroy(fl)
  object_destroy(memScan)

  return result_table
end

results = FirstScanValueBetween('1.1', '1.2')

for i=1,#results do
  print('found address: '..results[i])
end

for i=1,#results do
                  fullAccess(results[i], 8)
 writeDouble(results[i], 2.0)

  if (success~=true) then print('failed writing to: '..results[i]) end
end


Last edited by Firered on Tue Jun 26, 2012 11:46 pm; edited 2 times in total
Back to top
View user's profile Send private message
Firered
Cheater
Reputation: 0

Joined: 22 May 2012
Posts: 26

PostPosted: Mon Jun 25, 2012 9:13 am    Post subject: Reply with quote

I'm trying but this not work

Last edited by Firered on Tue Jun 26, 2012 11:47 pm; edited 2 times in total
Back to top
View user's profile Send private message
Firered
Cheater
Reputation: 0

Joined: 22 May 2012
Posts: 26

PostPosted: Tue Jun 26, 2012 9:29 am    Post subject: Reply with quote

this is my error writedouble..

Last edited by Firered on Tue Jun 26, 2012 11:48 pm; edited 2 times in total
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Tue Jun 26, 2012 11:47 am    Post subject: Reply with quote

Code:
function FirstScanValueBetween(input1, input2)

  local result_table = {}


  local memScan = createMemScan()
  local fl      = createFoundList(memScan)

  memscan_firstScan(memScan,soValueBetween, vtDouble, rtTruncated,input1, input2,
                    '0', '7fffffff', "+W-C", fsmAligned ,"4" , false , true, false, false)

  memscan_waitTillDone(memScan)
  foundlist_initialize(fl)

  local count = foundlist_getCount(fl)

  if count > 0 then
    for i=0,count-1 do
      result_table[i+1] = foundlist_getAddress(fl,i)
    end
  end

  object_destroy(fl)
  object_destroy(memScan)

  return result_table
end

results = FirstScanValueBetween('1.1', '1.2')

--print
for i=1,#results do
  print('found address: '..results[i])
end

--overwrite with 2.0
for i=1,#results do
                  fullAccess(results[i], 8)
  local success = writeDouble(results[i], 2.0)

  if (success~=true) then print('failed writing to: '..results[i]) end
end


note: it uses startAddress:0 and endAddress:7fffffff. Change that to your liking.

_________________
Back to top
View user's profile Send private message MSN Messenger
Firered
Cheater
Reputation: 0

Joined: 22 May 2012
Posts: 26

PostPosted: Tue Jun 26, 2012 10:02 pm    Post subject: Reply with quote

thx for help me
Back to top
View user's profile Send private message
Firered
Cheater
Reputation: 0

Joined: 22 May 2012
Posts: 26

PostPosted: Fri Jun 29, 2012 9:54 am    Post subject: Reply with quote

how i can return the values ​​of the double as it was before in this script?

I tried to use replaceAOB and restoreAOB but it did not work
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