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 


unregistersymbol() not unregistering the symbol?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
h3x1c
Master Cheater
Reputation: 17

Joined: 27 Apr 2013
Posts: 306

PostPosted: Wed Jul 27, 2016 2:47 pm    Post subject: unregistersymbol() not unregistering the symbol? Reply with quote

Not sure if this is a bug or something that's just a byproduct of the scenario I'm in, but I have two scripts, one group header and one child:

Group Header:

Code:
define(ballGlow,BallGlow:Update+22)

[ENABLE]
{$lua}
LaunchMonoDataCollector()
{$asm}
registersymbol(ballGlow)
ballGlow:
  db 74 04 C6 47 18 01

[DISABLE]
ballGlow:
  db 74 04 C6 47 18 01

unregistersymbol(ballGlow)


Child:

Code:
[ENABLE]
assert(ballGlow+2,C6 47 18)
ballGlow:
  db 90 90 C6 47 18 01

[DISABLE]
ballGlow:
  db 90 90 C6 47 18 00


If I disable the group header, I can still manually go to the address in the Memory Viewer via the symbol. The child script also works in this scenario, naturally.

Bug or something I'm screwing up? Laughing

_________________
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Jul 27, 2016 3:06 pm    Post subject: Reply with quote

There might be another symbol named ballglow not defined by the user.

(And that childscript is now editing unrelated memory)

Try using more unique names

_________________
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
h3x1c
Master Cheater
Reputation: 17

Joined: 27 Apr 2013
Posts: 306

PostPosted: Wed Jul 27, 2016 3:12 pm    Post subject: Reply with quote

Dark Byte wrote:
There might be another symbol named ballglow not defined by the user.

(And that childscript is now editing unrelated memory)

Try using more unique names


I should've stated that, too. If I DON'T register that symbol in the header script, the child script won't work with this exact configuration. Also, if I don't register that symbol, I can't manually go to ballGlow in the Memory Viewer after enabling or enabling/disabling the group header script. I just get "This is not a valid address."

EDIT: And if I enable or enable/disable the header script with register/unregister symbol, the child script still functions properly!

_________________
Back to top
View user's profile Send private message Visit poster's website
mgr.inz.Player
I post too much
Reputation: 222

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

PostPosted: Wed Jul 27, 2016 3:22 pm    Post subject: Re: unregistersymbol() not unregistering the symbol? Reply with quote

Because you used define the wrong way

Try this:
Code:
define(ballGlowDef,BallGlow:Update+22)

[ENABLE]
{$lua}
LaunchMonoDataCollector()
{$asm}
label(ballGlow)
registersymbol(ballGlow)

ballGlowDef:
ballGlow:
  db 74 04 C6 47 18 01

[DISABLE]
ballGlow:
  db 74 04 C6 47 18 01

unregistersymbol(ballGlow)

_________________
Back to top
View user's profile Send private message MSN Messenger
h3x1c
Master Cheater
Reputation: 17

Joined: 27 Apr 2013
Posts: 306

PostPosted: Wed Jul 27, 2016 3:32 pm    Post subject: Reply with quote

That was it, mgr.inz.Player! Thanks for the input, guys! Very Happy
_________________
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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