Specifically, #sector.lines in Lua was broke because I couldn't pointer math right, haha. This time it should work, after doing some typecasting.
#sector.lines