The error is saying that you’re trying to access an element of an array that doesn’t exist. You’re accessing two arrays in this call, prpVal and sValue.
prpVal is explicitly declared as having two elements, so it’s not the problem.
sValue’s size is not declared. It’s created by the Split function. The split function takes the input and makes an array based on the delimiter “-”. The input of Split is one of the arguments of UpdateProperty. Assuming that the error is happening when updateProperty is being called from main(), its value is coming from the inputbox. So the value you type into the input box must contain a dash. Does it?