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 


finding/printing addresslist

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

Joined: 08 Oct 2012
Posts: 577

PostPosted: Sat Apr 09, 2022 12:00 pm    Post subject: finding/printing addresslist Reply with quote

I've got a bug in one of my codes setting an address to some 0(probably). I'm looking at the CE LUA descriptions and I find
getAddress() : integer - (integer, table)

I attempted many variations of this using the debug window
Code:

al = getAddressList()
for i = 1,al.Count-1 do
x=getAddress(al,i)
print(al.Count .. " "  .. x)
end


All these attempts have failed with either a nil value for x or :Failure determining what means.

What the proper code for listing the addresses?
Back to top
View user's profile Send private message Yahoo Messenger
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Sat Apr 09, 2022 12:23 pm    Post subject: Reply with quote

Code:

for i = 0, AddressList.Count - 1 do
  print('The value of address [' .. AddressList.getMemoryRecord(i).Address .. '] is '.. AddressList.getMemoryRecord(i).Value)
end
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Sat Apr 09, 2022 1:22 pm    Post subject: Reply with quote

I wasn't necessarily looking for the values, but thanks for both.
Back to top
View user's profile Send private message Yahoo Messenger
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Sat Apr 09, 2022 1:38 pm    Post subject: Reply with quote

bknight2602 wrote:
I wasn't necessarily looking for the values, but thanks for both.


You can delete what isn't required. I included it for brevity.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 32

Joined: 16 Feb 2017
Posts: 1253

PostPosted: Sat Apr 09, 2022 2:23 pm    Post subject: Reply with quote

bknight2602 wrote:
I wasn't necessarily looking for the values, but thanks for both.



This is just a suggestion. Idea

Sometimes appreciating help is like a thank you.
Simply click the thumbs up under the helpful person's profile picture and leave a reputation comment.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Sat Apr 09, 2022 9:03 pm    Post subject: Reply with quote

Look like these :

Code:
local list = getAddressList()
for i = 0, list.Count-1 do
 memrec = list[i]
 theAddress = memrec.Address
 print(i..' '..theAddress)
end


for me Very Happy

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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