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 


Have problem while write value

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

Joined: 31 Jan 2020
Posts: 29
Location: 192.168.0.1

PostPosted: Fri Jan 31, 2020 9:27 am    Post subject: Have problem while write value Reply with quote

Hello guys..


i have written this script but when the [Get_id] value is invalid The game will hang and close
(same crash) how can i solve this

newmem:

mov edi,[Get_ID]
xor esi,esi

jmp return

the Get_ID i taken it from another Function

And sorry for my bad English not my Language Crying or Very sad
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
DanyDollaro
Master Cheater
Reputation: 3

Joined: 01 Aug 2019
Posts: 334

PostPosted: Fri Jan 31, 2020 9:49 am    Post subject: Reply with quote

Too general question, based on what you say if it is valid or not? it would be enough to follow a check before moving it to edi, or to see why the function returned an invalid ID
Back to top
View user's profile Send private message
Cyberfreak
Cheater
Reputation: 0

Joined: 28 Jan 2017
Posts: 30

PostPosted: Fri Jan 31, 2020 2:18 pm    Post subject: Reply with quote

My solution for a similar situation. Compare if it contains 0. If greater than 0, jump to the code and use it, otherwise do nothing and jump to return.

newmem:
cmp [rbx+44],0
jg code
nop
jmp return

code:

mov [rbx+44],(float)199.9
jmp return
Back to top
View user's profile Send private message
ghmarko
Cheater
Reputation: 0

Joined: 31 Jan 2020
Posts: 29
Location: 192.168.0.1

PostPosted: Sat Feb 01, 2020 4:16 am    Post subject: Reply with quote

Cyberfreak wrote:
My solution for a similar situation. Compare if it contains 0. If greater than 0, jump to the code and use it, otherwise do nothing and jump to return.

newmem:
cmp [rbx+44],0
jg code
nop
jmp return

code:

mov [rbx+44],(float)199.9
jmp return

but the invalid value not equal 0 its may be 78745236
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Cyberfreak
Cheater
Reputation: 0

Joined: 28 Jan 2017
Posts: 30

PostPosted: Mon Feb 03, 2020 1:19 am    Post subject: Reply with quote

Indeed, my example only checks if it contains a value (not NUL/empty), and if this value is bigger than 0. You have to adapt this example for your situation. As an explanation, if your script is about players health, and the health value can be between 0 and 199.9, you can perform 2 compare. First if it's bigger than 0, second if its smaller than 200.

Otherwise, as Danny said, give us an explanation what is a "valid" value for your situation.
Back to top
View user's profile Send private message
ghmarko
Cheater
Reputation: 0

Joined: 31 Jan 2020
Posts: 29
Location: 192.168.0.1

PostPosted: Mon Feb 03, 2020 5:27 am    Post subject: Reply with quote

Cyberfreak wrote:
Indeed, my example only checks if it contains a value (not NUL/empty), and if this value is bigger than 0. You have to adapt this example for your situation. As an explanation, if your script is about players health, and the health value can be between 0 and 199.9, you can perform 2 compare. First if it's bigger than 0, second if its smaller than 200.

Otherwise, as Danny said, give us an explanation what is a "valid" value for your situation.

this random Target ID when not target appear in the screen game crash
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
DanyDollaro
Master Cheater
Reputation: 3

Joined: 01 Aug 2019
Posts: 334

PostPosted: Mon Feb 03, 2020 7:22 am    Post subject: Reply with quote

We are not fortune tellers, you cannot create a script that tells you if that ID is valid or not if you don't even know how to distinguish it.
The function from which you get the ID will have to give you some more information, try to check the various bits and see if there is any bit that varies in a particular way, otherwise you will have to find some other method to understand if an ID is correct or not.
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 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