If the path / count is nil / 0, then it means setting the value directly rather than an array element. When setting the array element directly you can just use setvalueref(MCValueRef v) - the case-sensitive aspect is only needed when setting array elements.