Thank you Howard, it works, here's a magic chocolate box for you!
if chocolatepieces := 0 then chocolatepieces := +1;
As usual I copy-pasted the code without thinking and it gave me a dependency error message, then I saw your line and found the dependency and added it*. This was the only thing annoying me in the console so I can continue to learn the basics.
*If you are stuck here too, click Project in the menu bar then Project Inspector/Add/New Condition, in Package Name drop down list type "LazUtils" then click Create New Requirement.