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 


Access Violation in script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
sgsgwv$6263
Advanced Cheater
Reputation: 0

Joined: 05 Aug 2020
Posts: 75

PostPosted: Tue Mar 01, 2022 8:48 am    Post subject: Access Violation in script Reply with quote

I am trying to write a script to do something but after all the thinking and writing in notepad,when I finally paste the code to be used in cheat table by assigning to cheat table,it threw an Access Violation error. Below I am posting my script. Plz help me find the error.

Code:

[ENABLE]

aobscanmodule(movement,Cricket07.exe,D9 99 D8 02 00 00 D9 81) // should be unique
alloc(ballmem,100)
alloc(flagmem,100)
alloc(ball,4)
alloc(flag,4)
label(code)
label(return)
registersymbol(ball)
registersymbol(movement)
registersymbol(flag)


flagmem:
mov [flag],edx //+64
mov [edx+64],ebx
mov eax,[Cricket07.exe+417BC0]
jmp "Cricket07.exe"+3D8FB



ballmem:
mov [ball],ecx
fstp dword ptr [ecx+000002D8]
jmp "Cricket07.exe"+1434FF


movement:
  jmp ballmem
  nop

"Cricket07.exe"+3D8F3:
jmp flagmem
nop 3



{$lua}
local dub=1.8
local speedXString="[ball]+2d8"
local speedZString="[ball]+2dc"
local speedYString="[ball]+2e0"
local isBallHitAddr="[flag]+64"


function Stroker()
                if readInteger(isBallHitAddr)!=nil then while readInteger(isBallHitAddr)==0 do end end
                      speedx=readFloat(speedXString)
                      speedy=readFloat(speedYString)
                      speedz=readFloat(speedZString)
                      if readFloat("[ball]+2d8") and readFloat("[ball]+2dc") and readFloat("[ball]+2e0") then
                      speedx=speedx*dub
                      speedy=speedy*dub
                      speedz=speedz*dub
                      writeFloat("[ball]+2d8",speedx)
                      writeFloat("[ball]+2dc",speedz)
                      writeFloat("[ball]+2e0",speedy)
                      end
                      end --Function ends here


hk1=createHotkey(Stroker,0x53)

hk2=createHotkey(Stroker,0x57)

{$asm}

[DISABLE]

movement:
  db D9 99 D8 02 00 00
 
"Cricket07.exe"+3D8F3:
mov [edx+64],ebx
mov eax,[Cricket07.exe+417BC0] 
 

unregistersymbol(ball)
unregistersymbol(flag)
unregistersymbol(movement)
dealloc(flagmem)
dealloc(flag)
dealloc(ball)
dealloc(ballmem)

{$lua}

hk1.destroy()
hk2.destroy()
Back to top
View user's profile Send private message
Frouk
Master Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 489
Location: mov dword ptr [Ukraine]

PostPosted: Tue Mar 01, 2022 10:35 am    Post subject: This post has 1 review(s) Reply with quote

not !=
in lua:
~=

_________________
void(__cdecl *Haxing)(HWND hGameWindow)
Back to top
View user's profile Send private message
sgsgwv$6263
Advanced Cheater
Reputation: 0

Joined: 05 Aug 2020
Posts: 75

PostPosted: Tue Mar 01, 2022 11:01 am    Post subject: Reply with quote

thanks.
Is there any hidden setting which can also specify the line number in which access violation is occuring?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 460

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

PostPosted: Tue Mar 01, 2022 4:48 pm    Post subject: This post has 1 review(s) Reply with quote

get 7.4
_________________
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 -> General Gamehacking 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