Load Date($(vMinDate)+RecNo()-1) as TempDate
AutoGenerate $(vMaxDate) -$(vMinDate);
Here, there is no value coming up for $(vMinDate) causing nullvalue + RecNo() and so is a script line error
The last error is probably caused by an empty vMaxDate variable. Only the -$(vMinDate) part remains, leading to a negative AUTOGENERATE value and that is not accepted as a valid count.
Check your variables. You better get Min/Max date values by using something like:
LOAD Min(DateCompleted) AS MinDate, Max(DateCompleted) AS MaxDate
and then peeking into the single record of this table to get correct values. Your current code depends on the correct ordering of one of your source tables (first/last row) and that may produce unpredictable results...