ThatsJustLogic How do I cheat?
Reputation: 0
Joined: 09 Nov 2020 Posts: 2
|
Posted: Mon Nov 09, 2020 5:27 pm Post subject: Script works inside CE but not when exported as exe |
|
|
As the title says I have a script that works when ran from the lua script section of cheat engine but not when saved as an exe and im not too sure why its happening or how to fix it. (Im still pretty new to this so please excuse if the code is bad)
| Code: |
function WheelPlacementScan()
ms = createMemScan(FMT_WheelPlacement.ProgressBar)
ms.firstScan(soExactValue, vtByteArray, nil,"00 b0 ? ? ? ? 7f ? 00 80 ? ? ? ? 7f ? 00 b0 ? ? ? ? 7f ? 00 c0 f8 ? ? ? 7f ? 00 30 f9 ? ? ? 7f ? 00 40 ? ? ? ? 7f ? 00 90 ? ? ? ? 7f ? 00 80 ? ? ? ? 7f ? 00 e0", nil ,0 ,0xffffffffffffffff ,'+W-C', fsmNotAligned ,nil ,true ,true, false, false)
ms.waitTillDone()
local fl = createFoundList(ms)
fl.initialize()
BaseAddress="0x" .. ms.FoundList[0]
FMT_WheelPlacement.ProgressBar.Position = FMT_WheelPlacement.ProgressBar.Min
mr1=getAddressList().createMemoryRecord()
mr1.description="Front Track Width"
mr1.address="BaseAddress - 87"
mr1.OffsetCount=7
mr1.OffsetText[6]="98"
mr1.OffsetText[5]="40"
mr1.OffsetText[4]="0"
mr1.OffsetText[3]="138"
mr1.OffsetText[2]="30"
mr1.OffsetText[1]="10"
mr1.OffsetText[0]="254"
mr1.Vartype=vtSingle
FMT_WheelPlacement.TrackWidthFEdit.Text = mr1.Value
end
|
This code works properly and outputs the correct value to the ui element I want while in cheat engine but when exported as an exe it will only return ?? to the ui element and after some troubleshooting it looks like the pointer is invalid as it just shows P->??????? when I print mr1.AddressString.
I have ran the cheat engine and exe saved version side by side and compared the BaseAddress variable I get from the search and they have always appeared to be the same address so I dont actually know whats going wrong.
|
|