http://qs321.pair.com?node_id=1093581


in reply to Re: I need help with the error "Modification of non-creatable array value attempted"
in thread I need help with the error "Modification of non-creatable array value attempted"

Thanks for the reply but I've already found the error. I've updated the code to what it currently is, EXCEPT that I've left the $number/= 2; line (which made the error appear). It seems that it tried to assign a $number % 2 to an element of an array, but it couldn't since $number wasn't guaranteed to be a whole number (and I guess that makes % fail), I've changed the $number/= 2; to $number = int($number/ 2) and now it works perfectly :)