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 


Creating a new scan

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
idanfast
How do I cheat?
Reputation: 0

Joined: 12 Jun 2012
Posts: 1

PostPosted: Tue Jun 12, 2012 8:27 am    Post subject: Creating a new scan Reply with quote

Hi,

I know this might seem a pretty stupid question, but the lack of quality documentation on the lua capabilities of CE drove me insane.

I wrote the following script:

Code:
pid=getProcessIDFromProcessName("explorer.exe")
if(pid~=nil) then
             openProcess(pid)
else
             showMessage("Process not found!")
             return
end

ms=getCurrentMemscan()
if(ms==nil) then
            ms=createMemScan(true)
end

memscan_newscan(ms)
memscan_firstScan(ms,soUnknownValue,vtByte,rtRounded,0,nil,0,0xffffffffffffffff,"+W-C",fsmNotAligened,"",false,false,false,false)
found=memscan_getAttachedFoundlist(ms)
showMessage(foundlist_getCount(found))


But when I try to run it I'm getting an error: attempt to call global 'memscan_newscan' (a nil value)

So apparently I don't have any function named memscan_newscan in my scope.

Just to be safe I also tried seeing what the following function returns:
Code:
type(memscan_newscan)

It was nil...


Help would be much appreciated. Thanks!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Tue Jun 12, 2012 9:09 am    Post subject: Reply with quote

Looks like memscan_newscan didn't get implemented. It's not a problem as memscan_firstScan does a newscan as well

Also, since you are interested in the results, don't use getCurrentMemscan()
You can not wait till the results are done on that scan object. (memscan_waitTillDone() ) And immediately getting the results won't work as the scan might still be in progress. So use createMemScan() instead

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