101
Scripting and Reverse Engineering / Converting Data - ah... plz help, you know you want to ;)
« on: 2006-01-09 18:22:35 »
It should convert it to 'ACE'. before it would only convert to 414345 or show up "system.byte[]" for some unknown reason. From binary to Ascii Characters that can be put in a 'S'tring (not 's'tring).
The above code.. just added a little bit will convert the names of monsters from a byte array to a string.
---- edit ----
Im making a scene editor .. if you havent guessed. This is for me and skillster to help us mod some stuff that current ones cannot. it will include everything later.
Code: [Select]
String ^FileEditor::BinaryToString(array<Byte> ^data)
{
String ^tmpStr;
for (int i=0 ; i < data->GetLength(0) ; i++ )
{
if (data[i]+32 < 255)
{
tmpStr = tmpStr + ::Convert::ToChar(data[i]+32);
}
}
return tmpStr;
}
The above code.. just added a little bit will convert the names of monsters from a byte array to a string.
---- edit ----
Im making a scene editor .. if you havent guessed. This is for me and skillster to help us mod some stuff that current ones cannot. it will include everything later.