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 


writeBytes via table

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
HenryEx
Expert Cheater
Reputation: 2

Joined: 18 Dec 2011
Posts: 100

PostPosted: Tue Jan 28, 2014 3:29 pm    Post subject: writeBytes via table Reply with quote

So, i have a line like this in my script:

Code:
      writeBytes( "process.exe+200", 0xEB,0x1E )


Now i want to assign the address and the bytes to be written at a different place in the script, and i'm not sure if it works. The wiki says i need a table for this. I imagine it would look something like this:

Code:
pAddress = "process.exe+200"
tBytes = { 0xEB, 0x1E }

writeBytes( pAddress, tbytes )


The wiki also noted that this functionality was broken in earlier versions. Is it fixed in 6.3?
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Wed Jan 29, 2014 10:23 am    Post subject: Reply with quote

It works..
But you defined the var
tBytes as the table that holds your values,
But in the function you used a possible nil var (tbytes).

Pay attention.

Quote:
pAddress = "process.exe+200"
tBytes = { 0xEB, 0x1E }

writeBytes( pAddress, tbytes )


It should be this

Quote:
pAddress = "process.exe+200"
tBytes = { 0xEB, 0x1E }

writeBytes( pAddress, tBytes )

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