You have nothing in your loop, so your loop is taking 0 milliseconds, and that calculation would give you an infinite amount of frames so it's giving you an error. You need to actually put something in your loop, like a "WAIT 1".