|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
night_sky How do I cheat? Reputation: 0
Joined: 23 Apr 2018 Posts: 6
|
Posted: Mon Apr 23, 2018 1:03 am Post subject: Access violation + Addresses.tmp not found |
|
|
Hi, I'm trying to write a simple trainer to find the health (float) of a unit in Warcraft 3. I used the "Create form" feature of CE for this. My trainer has 2 buttons: the New scan does the first scan which searches for floating point values from 897 to 903. The Next scan button is not completed yet because the nextScan() doesn't work. Here is the code:
Quote: | AboutText=[[Scan for unit health]]
form_show(UDF1)
getAutoAttachList().add("war3.exe")
address_list=getAddressList()
UDF1.OnClose = CloseClick
memsc = createMemScan()
function CEButton1Click(sender)
memsc.firstScan(soValueBetween, "vtSingle float", rtRounded, 897, 903, 0, 0xffffffffffffffff, "+W-C", fsmNotAligned, nil, nil, nil, nil, true)
memsc.waitTillDone()
local foundlist = createFoundList(memsc)
foundlist.initialize()
print(foundlist.Count)
if (foundlist.Count>0 and foundlist.Count<=5)
then
for i=0, 5
do
print(foundlist.Address[i])
print(foundlist.Value[i])
end
end
foundlist.deinitialize()
foundlist.destroy()
end
function CEButton2Click(sender)
memsc.nextScan(soValueBetween, "vtSingle float", rtRounded, 897, 903, false, false, false, false, false)
local foundlist = createFoundList(memsc)
foundlist.initialize()
print(foundlist.Count)
foundlist.deinitialize()
end |
When I press the "next scan" button, I got "Access Violation". When I tried to access the memscan object using:
Quote: |
a=getCurrentMemscan()
a.nextScan(soValueBetween, "vtSingle float", rtRounded, 897, 903, false, false, false, false, false)
|
I got this error (see attachment)
When I checked, the ADDRESSES.TMP file was not in that folder. It was just empty. I hope someone can help me with this.
I have the source code of CE but I don't know where the code of function nextScan() is, so it's great if someone knows.
I'm using CE v6.7
The game is 32 bit
Description: |
|
Filesize: |
8.56 KB |
Viewed: |
4263 Time(s) |
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Mon Apr 23, 2018 2:21 am Post subject: |
|
|
so from the .exe it gives that error but when run from inside CE it works ok?
it could be your anti virus is blocking the unknown trainerfile from creating temp files
(and don't use getCurrentMemscan() in a trainer as there is none)
_________________
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 |
|
|
night_sky How do I cheat? Reputation: 0
Joined: 23 Apr 2018 Posts: 6
|
Posted: Mon Apr 23, 2018 3:23 am Post subject: |
|
|
Edit:
I've made some changes and it doesn't give error anymore. But now nextScan() yields 0 result, although the values don't change.
Quote: | AboutText=[[Scan for unit health]]
form_show(UDF1)
getAutoAttachList().add("war3.exe")
memsc = createMemScan()
function CEButton1Click(sender)
input_health=getProperty(UDF1.CEEdit1,"Text")
input_1=string.format("%s", input_health-3)
input_2=string.format("%s", input_health+3)
memsc.firstScan(soValueBetween, vtSingle, rtRounded, input_1, input_2, 0, 0xffffffffffffffff, "+W-C", fsmNotAligned, nil, nil, nil, nil, false)
memsc.waitTillDone()
local foundlist = createFoundList(memsc)
foundlist.initialize()
print("Number of addresses:", foundlist.getCount())
for i=0, 5
do
print(foundlist.getAddress(i))
print(foundlist.getValue(i))
end
foundlist.deinitialize()
end
function CEButton2Click(sender)
input_health=getProperty(UDF1.CEEdit1,"Text")
input_1=string.format("%s", input_health-3)
input_2=string.format("%s", input_health+3)
memsc.nextScan(soValueBetween, vtSingle, rtRounded, input_1, input_2, false, false, false, false, false)
memsc.waitTillDone()
local foundlist = createFoundList(memsc)
foundlist.initialize()
print("Number of addresses found:", foundlist.getCount())
if (foundlist.getCount()>0 and foundlist.getCount()<=5)
then
for i=0, 5
do
print(foundlist.getAddress(i))
print(foundlist.getValue(i))
end
end
foundlist.deinitialize()
end
function FormClose(sender)
memsc.destroy()
return caFree --Possible options: caHide, caFree, caMinimize, caNone
end |
Now the health is given in the text field
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Tue Apr 24, 2018 11:40 am Post subject: |
|
|
you're not attached to the process when you're doing your scan
_________________
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 |
|
|
night_sky How do I cheat? Reputation: 0
Joined: 23 Apr 2018 Posts: 6
|
Posted: Wed Apr 25, 2018 3:52 am Post subject: |
|
|
I already did! The first scan is successful, but the next scan always fails.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Wed Apr 25, 2018 6:48 am Post subject: |
|
|
Code: |
nextScan(scanoption, roundingtype, input1,input2, isHexadecimalInput, isNotABinaryString, isunicodescan, iscasesensitive, ispercentagescan, savedresultname OPTIONAL)
|
vtSingle is not a valid rounding type
rtRounded is not a valid input string, .....
_________________
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 |
|
|
night_sky How do I cheat? Reputation: 0
Joined: 23 Apr 2018 Posts: 6
|
Posted: Wed Apr 25, 2018 7:34 am Post subject: |
|
|
How stupid I am. I was looking at the firstScan() function when writing the nextScan()
|
|
Back to top |
|
|
|
|
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
|
|