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 


Way to Check Symbol list using lua

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

Joined: 17 Aug 2020
Posts: 170
Location: Milkey Way

PostPosted: Sat Oct 03, 2020 10:43 am    Post subject: Way to Check Symbol list using lua Reply with quote

@Dark Byte
is there a better way to do check if a specific symbol exists in frmSymbolhandler or Symbol List

this is the best I could come up with
Code:
myVal = 10
b = getMemoryViewForm().frmSymbolhandler.ListView1.Items
for j=0,b.Count-1 do
  if b.Item[j].Caption == 'myVal' then
      unregisterSymbol('myVal')
  end
end
registerSymbol('myVal',myVal)
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4708

PostPosted: Sat Oct 03, 2020 12:07 pm    Post subject: Reply with quote

Code:
if getAddressSafe'myVal' then unregisterSymbol'myVal' end

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
MMM-304
Expert Cheater
Reputation: 0

Joined: 17 Aug 2020
Posts: 170
Location: Milkey Way

PostPosted: Sat Oct 03, 2020 1:20 pm    Post subject: Reply with quote

i figured it out thanks anyway for reply
i was trying the other way and it was not working so....

Code:
myVal = 10
unregisterSymbol('myVal')
print('myVal is', tostring(getAddressSafe('myVal')))
if not getAddressSafe('myVal') then
  registerSymbol('myVal',myVal)
end
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