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 


Lua script, I need help
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
mgr.inz.Player
I post too much
Reputation: 218

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

PostPosted: Fri Jan 06, 2017 6:30 am    Post subject: Reply with quote

Are you sure you have the correct value type? Try "double".
_________________
Back to top
View user's profile Send private message MSN Messenger
fcqgju14156
Newbie cheater
Reputation: 0

Joined: 01 Jan 2017
Posts: 18

PostPosted: Fri Jan 06, 2017 8:33 am    Post subject: Reply with quote

It is the right type of values.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

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

PostPosted: Fri Jan 06, 2017 11:11 am    Post subject: Reply with quote

When I see weird sequence like this: 2.560937405, 2.748437405, 2.827343702, 2.967968702

It comes to my mind that in reality this sequence are doubles (aka double-precision floating-point), not floats (aka single-precision floating-point).

Proof:





So, I think the sequence is: 9.95 , 15.95 , 20.95 , 29.95

_________________
Back to top
View user's profile Send private message MSN Messenger
fcqgju14156
Newbie cheater
Reputation: 0

Joined: 01 Jan 2017
Posts: 18

PostPosted: Fri Jan 06, 2017 1:54 pm    Post subject: Reply with quote

No, I need float values.


double.PNG
 Description:
 Filesize:  9.9 KB
 Viewed:  9116 Time(s)

double.PNG


Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

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

PostPosted: Fri Jan 06, 2017 4:31 pm    Post subject: Reply with quote

You didn't just change type of already added addresses? Yes, you do.

If you have, for example, 2.5609374005 in the list, try changing type to double AND change address to address-4.

_________________
Back to top
View user's profile Send private message MSN Messenger
fcqgju14156
Newbie cheater
Reputation: 0

Joined: 01 Jan 2017
Posts: 18

PostPosted: Mon Jan 09, 2017 6:24 am    Post subject: Reply with quote

Why change the float on the double? I need a script.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

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

PostPosted: Mon Jan 09, 2017 8:02 am    Post subject: Reply with quote

You want the script but you didn't provide a proof that those values are single-precision.

Just find this 2.560937405, add to table, change value type to double, and change address to address-4 and give a screenshot (URL link without http and www part).

_________________
Back to top
View user's profile Send private message MSN Messenger
fcqgju14156
Newbie cheater
Reputation: 0

Joined: 01 Jan 2017
Posts: 18

PostPosted: Mon Jan 09, 2017 12:27 pm    Post subject: Reply with quote

"and change address to address-4" I don't understand


abc1.PNG
 Description:
 Filesize:  2.26 KB
 Viewed:  8943 Time(s)

abc1.PNG


Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

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

PostPosted: Mon Jan 09, 2017 4:17 pm    Post subject: Reply with quote

if address is 4800610C, change it to 48006108
(tip: google "hexadecimal")

_________________
Back to top
View user's profile Send private message MSN Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Jan 09, 2017 7:34 pm    Post subject: Reply with quote

Or just set the address to "4800610C-4" and let CE do the complex math.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Jan 09, 2017 8:13 pm    Post subject: Reply with quote

Or, just highlight the address, press Ctrl+C, then Ctrl+V and put -4 in the 'Adjust address by' box.
Back to top
View user's profile Send private message
fcqgju14156
Newbie cheater
Reputation: 0

Joined: 01 Jan 2017
Posts: 18

PostPosted: Tue Jan 10, 2017 3:27 am    Post subject: Reply with quote

I did


abc2.PNG
 Description:
 Filesize:  1.95 KB
 Viewed:  8710 Time(s)

abc2.PNG


Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

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

PostPosted: Tue Jan 10, 2017 8:23 am    Post subject: Reply with quote

So, as you see, value type is in fact a "double" (double-precision).
4.949999 is close enough to 4.95 I wrote earlier.

Quote:
and replaces recording instructions on NOP

Highlight first address with 4.94999..., right-click and choose "find out what accesses this address". New window will show up.

Alt-tab from CE, play for a while, go back to CE.

In this new window, there should be instructions which accessed/wrote to the address, highlight first instruction, resize window so we can see everything in top part and bottom part of window, also resize columns. Take a screenshot. Close it.

Highlight second address with 15.94999... and do the same thing. Take a screenshot.


Upload screenshots here.

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

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Tue Jan 10, 2017 8:38 am    Post subject: Reply with quote

mgr.inz.Player wrote:
So, as you see, value type is in fact a "double" (double-precision).
4.949999 is close enough to 4.95 I wrote earlier. .


Do you know what a "Double" value is. They do not have only 2 decimal places. They can have much more, twice the amount of a Float.

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

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

PostPosted: Tue Jan 10, 2017 9:07 am    Post subject: Reply with quote

Filipe_Br wrote:
Do you know what a "Double" value is. They do not have only 2 decimal places. They can have much more, twice the amount of a Float.

Rolling Eyes

_________________
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 Lua Scripting All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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