Originally Posted by Farmbuyer
What, exactly, are you referring to as "bytecode"?
That doesn't mean what you think it means in a Lua context. Or at least, not in a forum about Lua addons. Perhaps we can clear up any confusion.
|
Well in the context given it involves the string byte code to be precise. As seen in the ever popular addon Carbonite where it's used to condense values and coordinates. My question is whether or not it's possible to condense a "word" string such as that "Sharptalon's Claw" could be saved as something smaller in a "byte" string.
Also, I figured out the answer to my first question. This, when used in an addon, will output the values in an indexed format directly into the addons saved variables file and print it to the current chatframe.
Code:
if not aSavedVariable then aSavedVariable = {} end-- some SavedVariable table
aSavedVariable [0] = string.char(0)
print(0 .. " = " .. strbyte(string.char(0))
--tinsert(aSavedVariable , string.char(0))
for x = 1, 255 do
aSavedVariable [x] = string.char(x)
print(x .. " = " .. strbyte(string.char(x))
--tinser(aSavedVariable , string.char(x))
end