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 


Why sometimes script can not be disabled?

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

Joined: 12 Jun 2016
Posts: 96

PostPosted: Tue Jun 14, 2016 1:54 pm    Post subject: Why sometimes script can not be disabled? Reply with quote

It makes me mad,when i use other Trainer from Internet,they all work fine,I can active and deactive every time every place.

But when I try to make a trainer of my own,sometimes it just can't be deactive,no matter run at CE or run at exported exe.

Why?What causes some of the script can't be disabled?

It seems some times later,the script switch from enable and disable a few times,and play a little while,and suddenly it will not be disabled any more,the times is not fixed number.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Jun 14, 2016 3:40 pm    Post subject: Reply with quote

The most common reason is that people use the same symbolname for multiple scripts.

Use 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
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Jun 14, 2016 4:10 pm    Post subject: Reply with quote

I would also check to make sure that your script does not contain any errors (e.g. you have registersymbol(whatever_symbol) instead of unregistersymbol(whatever_symbol) in your disable section). Also, if you are using a single hotkey for toggle, try using different hotkeys for enable and disable, or, changing your hotkey interval.
Back to top
View user's profile Send private message
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Wed Jun 15, 2016 1:46 am    Post subject: Reply with quote

Dark Byte wrote:
The most common reason is that people use the same symbolname for multiple scripts.

Use unique names

Yes,I just use the template code as a framework,so what you mean is change all script in different script all with their unique name?

For example:

This is my F2 hotkey script

Code:
[ENABLE]
globalalloc(newmem,0x1000)

label(code)
label(return)

newmem:

code:
  mov [ecx+10],0
  jmp return

This War of Mine.exe+28C393:
  jmp code
return:


[DISABLE]
This War of Mine.exe+28C393:
movss [ecx+10],xmm0


This is my F3

Code:

[ENABLE]
globalalloc(newmem,0x1000)

label(code)
label(return)

newmem:

code:
  fld1
  fstp [edi+8]
  push 0
  push eax
  mov [ebp-54],edi
  jmp return

This War of Mine.exe+286135:
  jmp code
  nop
return:


[DISABLE]
This War of Mine.exe+286135:
push 0
push eax
mov [ebp-54],edi


They use the same symbolname 'newmem', 'code' and 'return',
so I just change it to

F2newmem, F2code and F2return,

F3newmem,F3code and F3return,

will it be OK?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Jun 15, 2016 2:41 am    Post subject: Reply with quote

yes, or with scripts like that use alloc instead of globalalloc (the template code doesn't use globalalloc. And there it's certainly a requirement that the name is unique)
_________________
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
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Wed Jun 15, 2016 2:53 am    Post subject: Reply with quote

Dark Byte wrote:
yes, or with scripts like that use alloc instead of globalalloc (the template code doesn't use globalalloc. And there it's certainly a requirement that the name is unique)

Yes,the template use alloc instead of globalalloc and it has a dealloc function too.

and globalalloc without dealloc is something I copy from other cheat table,what's the different between them?

I guess global one will alloc in heap instead of stack,is that right?

and since it will be used all over the game,which one is better??

and one more question if I may.

the template use

alloc(newmem,$1000)

the global one use

globalalloc(newmemTime,0x1000)

what does the '$' symb mean?and different from 0x1000??are they the same??


Last edited by mindoff on Wed Jun 15, 2016 2:58 am; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Jun 15, 2016 2:58 am    Post subject: Reply with quote

i recommend alloc, as globalalloc is only useful if you understand what it does.

globalalloc will not allocate a new block of memory, but reuse it, overwriting the contents of the memory that was previously there (if the name is the same)

_________________
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
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