I need to write a LUA script that can convert a number from a BCD format to an integer. Let's say my initial byte array looks like this:
local bcdArray = {0x73, 0x31, 0x30, 0x00}
If I understand the BCD format correctly, this array should turn into 31337. I have never worked with this programming language before, please help.