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 this LUA SCRIPT DONT WORK?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sun Apr 23, 2017 6:28 pm    Post subject: Reply with quote

The start address of -20000 is probably being converted to an unsigned integral type, meaning the actual range is something like FFFFFFFFFFFFB1E0 - FFFFFFFFFFFFFFFF.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
jededias
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 15 Apr 2017
Posts: 17

PostPosted: Sun Apr 23, 2017 6:36 pm    Post subject: how to fix it? Reply with quote

ParkourPenguin wrote:
The start address of -20000 is probably being converted to an unsigned integral type, meaning the actual range is something like FFFFFFFFFFFFB1E0 - FFFFFFFFFFFFFFFF.



how to fix it?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sun Apr 23, 2017 6:38 pm    Post subject: Reply with quote

Change the start address to something usable. For example, 0.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
jededias
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 15 Apr 2017
Posts: 17

PostPosted: Sun Apr 23, 2017 6:42 pm    Post subject: HELP Reply with quote

ParkourPenguin wrote:
Change the start address to something usable. For example, 0.


I did it, but don't work. you can send the code here?

Have skype, facebook or whatsapp?

And you can do a code like this for float scan?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sun Apr 23, 2017 6:53 pm    Post subject: Reply with quote

It works fine for me.

Note that the scan is using soValueBetween with equivalent parameters. This means the scan will only find values that are exactly 0.07- no more, no less. If you don't want that behaviour, use soExactValue.

If you want to scan for a float, change vtDouble to vtSingle.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sun Apr 23, 2017 7:11 pm    Post subject: Reply with quote

Because you told it to:
Code:
for i=0, fl.Count-1 do
  writeDouble(fl.Address[i], 0)
end

PS: if you change the value type to vtSingle (aka float), use writeFloat instead of writeDouble.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
jededias
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 15 Apr 2017
Posts: 17

PostPosted: Sun Apr 23, 2017 7:17 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Because you told it to:
Code:
for i=0, fl.Count-1 do
  writeDouble(fl.Address[i], 0)
end

PS: if you change the value type to vtSingle (aka float), use writeFloat instead of writeDouble.


Works now, you can add me in skype or whatsapp or facebook? I have some hacks issues '-'
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sun Apr 23, 2017 7:24 pm    Post subject: Reply with quote

No. I'll answer questions every now and then on these forums.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
jededias
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 15 Apr 2017
Posts: 17

PostPosted: Sun Apr 23, 2017 8:24 pm    Post subject: Help with this Reply with quote

ParkourPenguin wrote:
No. I'll answer questions every now and then on these forums.


How do a hack that need multiple scans ?
I know how get the X and Y value, but need 3 scans (first, next, next).
And how change the results manual in trainer like X9999 to X5000 ?



1234.jpg
 Description:
 Filesize:  46.06 KB
 Viewed:  7491 Time(s)

1234.jpg


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sun Apr 23, 2017 8:36 pm    Post subject: Reply with quote

The text inside an editbox can be accessed via the Text property of an editbox object.
Code:
-- read from the editbox
local num = tonumber(UDF1.CEEdit1.Text)

-- write to the editbox
UDF1.CEEdit1.Text = '1234'

A memory scan object has a nextScan method that performs another scan on the results of a previous scan. For information regarding this, see the file "main.lua" located in the main CE directory. For examples, use Google.

If you're trying to find a value, a pointer or a code injection would be much better suited than scanning for it. See this topic for more information.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
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 Lua Scripting 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