> Do I understand it correctly that 0 is a specific variable?
No, the ==0 just says: If there is no (zero) variance (and therefore not standard deviation) in the items/values of 'AB01' (see thhe first code line with valueSD()), than go the page "end" page.
> I have 1 item with 24 scalas and 7 possible answers / variables.
You mean one scale with 24 items? Or 24 scales, each with 7 items?