Aller au contenu

Conversion Hexa => Dec


PITP2

Messages recommandés

 

 

 
18down voteaccepted

You use tonumber:

local someHexString = "03FFACB"

local someNumber = tonumber(someHexString, 16)

Note that numbers are not in hexadecimal. Nor are they in decimal, octal, or anything else. They're just numbers. The number 0xFF is the same number as 255. "FF" and "255" are string representations of the same number.

  • Upvote 2
Lien vers le commentaire
Partager sur d’autres sites

×
×
  • Créer...