I have an Instance ID (ItemInstanceID) in ulong and want to determine if that value is an invalid value. Is there an invalid value (0 etc.) in the InstanceID?
I have an Instance ID (ItemInstanceID) in ulong and want to determine if that value is an invalid value. Is there an invalid value (0 etc.) in the InstanceID?
The ItemInstanceId is a hex-encoded number that can consist of letters from A to F and numbers from 0 to 9. It can’t contain the letters that beyond F, and the punctuation marks, special characters, etc. If you submit the invalid ItemInstanceId that contains the invalid characters to PlayFab API, such as GetUserInventory, it will return the error "ItemInstanceId": [must be a hex-encoded number"].
Hello, Thanks for the your answer!
Am I right in thinking that the instance ID may return all the values that u64 can take?
If that's the case, then if I want to handle invalid values in my game, I need to keep them in a null-allowed type like string or boost's optional<ulong>, which is a bit cumbersome.
Currently, our hexadecimal-encoded numbers are 16-bit strings. Their corresponding decimal numbers can be taken as u64. But there are no obvious restrictions on hexadecimal coded numbers. It may exceed the value range of u64 in the future.
5 People are following this question.