No problem, it was one of these issued I noticed early on, but I considered all my projects finished because I can't afford maintaining them. It's nice to do a little problem solving once in a while and I'm glad it helped you out.
Happy new year to you as well and good luck with developing your game!
Just noticed a typo: csp is supposed to be named cps, but it was a quick and dirty code to test if it conceptually worked. Copy-pasted the wrong name everywhere... will fix that comment later.