PITP2 Posté(e) le 16 juin 2015 Signaler Partager Posté(e) le 16 juin 2015 Hello, auriez vous une fonction en lua permettant de convertir de l'hexa en décimale ? j'ai trouvé des trucs sur le net mais cela fait un peu usine àgaz .... 1 Lien vers le commentaire Partager sur d’autres sites More sharing options...
jojo Posté(e) le 16 juin 2015 Signaler Partager Posté(e) le 16 juin 2015 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. 2 Lien vers le commentaire Partager sur d’autres sites More sharing options...
PITP2 Posté(e) le 16 juin 2015 Auteur Signaler Partager Posté(e) le 16 juin 2015 Merci Jojo Lien vers le commentaire Partager sur d’autres sites More sharing options...
Messages recommandés