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 


Need help with scripting

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
vng21092
Grandmaster Cheater
Reputation: 15

Joined: 05 Apr 2013
Posts: 644

PostPosted: Sat May 31, 2014 2:43 pm    Post subject: Need help with scripting Reply with quote

Why won't these two work? I want the purpose of the first script to enable cheats. Only when the first one is enabled, the second one can be toggled. The second script will jump to certain section of the first script (the cheat), and when disabled will go back to the code in the disabled section of the second script. Game crashes... why? O_o. How do I fix this?

Code:

[Enable]

alloc(cheats,2048)

cheats:

label(infiniteammo_1)
registersymbol(infiniteammo_1)
label(infiniteammo_ret)

infiniteammo_1:
sub [eax+ecx*4+04],0
add esp,10
jmp infiniteammo_ret

infiniteammo_ret:

[Disable]

unregistersymbol(infiniteammo_1)
dealloc(cheats)


Code:

[Enable]

"iw5sp.exe"+D6832:
jmp infiniteammo_1
nop
nop

[Disable]

"iw5sp.exe"+D6832:
sub [eax+ecx*4+04],edx
add esp,10
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sat May 31, 2014 2:50 pm    Post subject: Reply with quote

Code:
[Enable]

alloc(cheats,2048)
label(infiniteammo_1)
registersymbol(infiniteammo_1)

cheats:
infiniteammo_1:
sub [eax+ecx*4+04],0
add esp,10
jmp infiniteammo_ret

[Disable]
unregistersymbol(infiniteammo_1)
dealloc(cheats)



Code:
[Enable]

label(infiniteammo_ret )
registersymbol(infiniteammo_ret)
"iw5sp.exe"+D6832:
jmp infiniteammo_1
nop
nop
infiniteammo_ret

[Disable]
"iw5sp.exe"+D6832:
sub [eax+ecx*4+04],edx
add esp,10

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
vng21092
Grandmaster Cheater
Reputation: 15

Joined: 05 Apr 2013
Posts: 644

PostPosted: Sat May 31, 2014 3:05 pm    Post subject: Reply with quote

first script can't be added because infiniteammo_ret isn't defined
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Sat May 31, 2014 5:45 pm    Post subject: Reply with quote

Create an empty entry and then edit it afterwards.

Or create a userdefined symbol with the given name first

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