I am currently making a converter for converting hexadecimals into decimal. When I put a character in console, it says
"Argument #1 expected a string. It provided an Integer".
I tried using Char(ToInteger(n)) and Char(ToCode(n)) but it always returns with
"Argument #1 expected a string. It provided an Integer".
Please tell me what is lacking or what is the problem
I guess you want to convert a string containing the hexadecimal representation of a number into an integer. You need to work through your string character by character and for every character use the
ToChar()function. The function wants a string of length 1 and converts the single character into its value in the ASCII table. Example:This prints
From here you can work out the other cases.