HelpConverting a String( "10") into a Byte ("10")

Posts 1–9 of 9 · Page 1 of 1
Converting a String( "10") into a Byte ("10")
Hello,
I want to convert a String like "1B 30 00" into a byte array and write this
When i show at the address 01D08B3C (change weapon) as Byte array it looks like this :
"1B 00 00 00 43 00 00 00 00 00 00"

the 1B is the weapon (ACR 6.8 weapon id hex(27) = 1B the following two blocks of "00" shows which attachment this weapon have

"1B 10 00 00 43 00 00 00 00 00 00" = ACR with ACOG
"1B 30 00 00 43 00 00 00 00 00 00" = ACR with red dot

"1B 10 10 00 43 00 00 00 00 00 00" = ACR with ACOG and Silencer

and I want to edit this I write in a Textbox the code "1B 30 00"
and he convert this to the bytes and write it to this address
But I doesn't get it q.q

I use @Jorndel 's class.
May some on could give me a hint? Would be awsome !

Sincerely Nordiii
@ @Nordiii
Code:
Integer.Parse("A1", System.Globalization.NumberStyles.HexNumber)
Suppose that's what you want.
Thank you so much <3
Works perfekt!
Quote Originally Posted by Nordiii View Post
Thank you so much <3
Works perfekt!
When I think about it, you code VB so you can easy do:
Dim MyHex As Integer = Hex("A1")
Quote Originally Posted by Jorndel View Post


When I think about it, you code VB so you can easy do:
that this is the wrong type because you doesn't add &H

it must look like this or not?
Dim MyHex As Byte = "&H" + Hex("A1")

Sry im not so good with VB
Quote Originally Posted by Nordiii View Post
that this is the wrong type because you doesn't add &H

it must look like this or not?
Dim MyHex As Byte = "&H" + Hex("A1")

Sry im not so good with VB
Why would you add: &H to a Hex Convert-function?
So no.
Quote Originally Posted by Jorndel View Post


Why would you add: &H to a Hex Convert-function?
So no.
I tried to convert a String (hex) to an integer but that always throws me a error message because he doesn't know this is a Hex :/

Wayne ! your code befor works perfekt
Thank you again !
Quote Originally Posted by Nordiii View Post
I tried to convert a String (hex) to an integer but that always throws me a error message because he doesn't know this is a Hex :/

Wayne ! your code befor works perfekt
Thank you again !
Oki then, suppose it's solved then?
Quote Originally Posted by Jorndel View Post


Oki then, suppose it's solved then?
Yes thread can get closed
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us