Invalid register variable - You specified a register variable which is not allowed in this context. Register variables must be LOCAL, and must be one of: Integer, Long, Word, DWord, or Extended float. It's also possible this variable was used with a function such as VARPTR(), which requires a memory variable for correct execution.