Motor Acceleration Timer Deceleration Problem

So I need to initialize
Code:

static unsigned long lastTick = 0;

this differently?

You don't need to initialise it at all - it is static, so the compiler makes it zero, unless you tell it otherwise.
But you do need to update it.