I try to save a number into an array, but I get Warning: Illegal offset type and the code stops. I can\'t find a logical reason for the error.