View previous topic :: View next topic |
Author |
Message |
h3x1c Master Cheater
Reputation: 17
Joined: 27 Apr 2013 Posts: 306
|
Posted: Wed Jul 27, 2016 2:47 pm Post subject: unregistersymbol() not unregistering the symbol? |
|
|
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?
_________________
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
|
Posted: Wed Jul 27, 2016 3:06 pm Post subject: |
|
|
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 |
|
 |
h3x1c Master Cheater
Reputation: 17
Joined: 27 Apr 2013 Posts: 306
|
Posted: Wed Jul 27, 2016 3:12 pm Post subject: |
|
|
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 |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Jul 27, 2016 3:22 pm Post subject: Re: unregistersymbol() not unregistering the symbol? |
|
|
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 |
|
 |
h3x1c Master Cheater
Reputation: 17
Joined: 27 Apr 2013 Posts: 306
|
Posted: Wed Jul 27, 2016 3:32 pm Post subject: |
|
|
That was it, mgr.inz.Player! Thanks for the input, guys!
_________________
|
|
Back to top |
|
 |
|