Oh, apparently the issue is in += operator. After I replaced it it kinda fixed
This is a rather major issue, but I'm kinda used to Lua's lack of += anyway)
Edit: also room_width and room_height are undefined