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 


how to define a array in auto assemble

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> Auto Assembler tutorials
View previous topic :: View next topic  
Author Message
tkh321
How do I cheat?
Reputation: 0

Joined: 02 Feb 2009
Posts: 6

PostPosted: Sat Jul 17, 2010 11:54 am    Post subject: how to define a array in auto assemble Reply with quote

how to define a array in auto assemble

thanks Sad
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sat Jul 17, 2010 12:02 pm    Post subject: Reply with quote

you don't. you don't even declare normal variables actually Razz.

Code:
alloc(arr, N*X)

allocates memory for an array of N elements each of size X

and
Code:
[arr+index*X]

accesses elements. (index is obviously zero-based)

e.g.
Code:

alloc(arr,12) //3 integers

mov [arr],1
mov [arr+4],2
mov [arr+8],3
Back to top
View user's profile Send private message
tkh321
How do I cheat?
Reputation: 0

Joined: 02 Feb 2009
Posts: 6

PostPosted: Sat Jul 17, 2010 12:22 pm    Post subject: Reply with quote

i do it like this

alloc(arr,60)
registersymbol(arr)
arr:
dd 150,200,250,250,250,250,250,250,250,250,250,250,250,250,250

why it not works

i find the value is
(decimal)
366,366,366,366,366,366,366,366,366,366,366,366,366,366,366

it's only 15 keys less than what i typed in 16 keys
and the value is not right

can you tell you why?
thanks
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 890

PostPosted: Sat Jul 17, 2010 2:49 pm    Post subject: Reply with quote

Try separating the dd so it's one per line. db works with multiple parameters, but dd doesn't seem to.

i.e., use:
dd 150
dd 200
dd 250
...

or:
db 50 01 00 00 00 02 00 00 50 20 00 00 ...

The code you wrote looks fine to me, maybe DB can tell us why it doesn't work. In the meantime, you at least have a workaround.

Cheers,
adude
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 Tutorials -> Auto Assembler tutorials 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