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 


Custom Type with Lua: How to Return String?

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

Joined: 29 Aug 2014
Posts: 1

PostPosted: Fri Aug 29, 2014 11:46 pm    Post subject: Custom Type with Lua: How to Return String? Reply with quote

Searched the forums and didn't find anything helpful. I am reverse engineering some software and the software uses some kind of string of the following structure: (I think it's c++ stl string?)
Code:

struct {
    union {
        char * pdata;
        char cdata[16];
    }
    dword length;
    dword capacity;
    dword unknown;
}

If the text is less than 16 bytes, it will be stored in cdata, and if it exceeds 15 bytes, it will be stored in the additionally allocated memory pointed to by pdata. I want to use custom type and return the real text of the structure, but whatever string the lua script returns, the displayed value always becomes 0. So is custom string type supported? If not, consider this a feature suggestion Smile. And thanks for the great software!
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 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