Closed going-digital closed 9 months ago
Workaround: Use an intermediate variable.
function TIC()
cls()
x="abc"
print(x:sub(1, f//10 % 4 + 1),0,0,12, false, 1)
f = f + 1
end
f=0
Should be fixed, can you try: pip install git+https://github.com/vsariola/pakettic.git@main
to check if it resolves your issue.
If it's ok, I probably should release a minor release before lovebyte, as there's now two bug fixes already there. This one of yours was actually possible to encounter in sizecoding, the other one is more rare.
Working well - thanks for the fix!
Pakettic fails on this example:
Pakettic optimises
("abc"):sub()
to"abc":sub()
. This breaks the code. In Lua,("abc")
is a string object, but"abc"
is a literal which doesn't have string methods.