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 


4 bytes value in string

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
nb81
Cheater
Reputation: 0

Joined: 08 Jun 2013
Posts: 35

PostPosted: Sun Jun 23, 2013 4:49 am    Post subject: 4 bytes value in string Reply with quote

Hey!

I want to ask how CE converts a string's 4 byte value to string? Like there is an username and when I change it's type to 4 bytes I get XXXXXXXXXXX... and then change it back to string, I get the correct string I want.
When I use encoding(UTF8) in C# it only displays the first 4 letters of the username(but the correct letters).

I'm writing a trainer in C# and want to display the username in it.

Thanks!
Back to top
View user's profile Send private message
Fresco
Grandmaster Cheater
Reputation: 4

Joined: 07 Nov 2010
Posts: 600

PostPosted: Thu Jun 27, 2013 2:00 pm    Post subject: Reply with quote

if you know, in ascii every character has a 1 byte value.
so any number could be translated into characters.
and utf8 it's jut another convention
https://en.wikipedia.org/wiki/UTF-8
look at codepage layout
every letter corresponds to a 2byte number in utf8
in c plus plus you could use "reinterpret cast" to reinterpret a string as an integer
an example would be
Code:
char x[]="hello"
reinterpret cast *x as integer *int with identifier z //look up the net for the correct syntax
std::cout << z
that should diplay a number
otherwise

int x = 30495864
reinterpret cast *x as string *char with identifier z
std::cout << z
that should display a string (it will go on displaying till it finds a zero value)

or

int x[]={ number, number ,0 }
reinterpret cast ...
cout z

_________________
... Fresco
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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