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 this script

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

Joined: 12 Apr 2023
Posts: 1
Location: Australia

PostPosted: Wed Apr 12, 2023 10:41 am    Post subject: Need help with this script Reply with quote

Hi so I am not really sure if I can ask for help but I need help with this code so it's for the game Ben 10: Power Trip and the code is just infinite money but when I enable it the value should be at 1000000000.0 but instead goes to 0 and when deactivated the value is set to 1000000000.0 and I don't understand why it's in reverse i'll put the code here

Edit: I am new to coding in general and I also did auto assemble and then AOB injection hope that helps

Code:

[ENABLE]

aobscan(Infmoney1,48 63 00 89 45 F8) // should be unique
alloc(newmem,$1000,Infmoney1)

label(code)
label(return)

newmem:

code:
  mov [rax], 1000000000.0
  jmp return

Infmoney1:
  jmp newmem
  nop
return:
registersymbol(Infmoney1)

[DISABLE]

Infmoney1:
  db 48 63 00 89 45 F8

unregistersymbol(Infmoney1)
dealloc(newmem)

Please help me figure out what I am doing wrong.
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 94

Joined: 14 Jul 2007
Posts: 3108

PostPosted: Wed Apr 12, 2023 12:53 pm    Post subject: Reply with quote

When you do not specify anything, CE will consider it a Hexadecimal Integer.
If you want to write a decimal float, int, double, put that qualifier into brackets.
E.g. mov [rax], (float)1000000000.0

You posted this in the wrong section though - it's not a LUA script.
Back to top
View user's profile Send private message
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