File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
json_config_file/json_properties Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ const MESSAGE_ENUM_NOT_VALID = "'%s' is not in the list of valid values"
110110const MESSAGE_ARRAY_SMALLER_THAN_MIN = "The array size (%d ) is smaller than the minimum allowed (%d )"
111111const MESSAGE_ARRAY_BIGGER_THAN_MAX = "The array size (%d ) is bigger than the maximum allowed (%d )"
112112const MESSAGE_ARRAY_TWO_ELEMENTS_ARE_EQUAL = "The array contains two elements that are equal: [%d ] and [%d ]"
113+ const MESSAGE_ARRAY_TWO_KEYS_ARE_EQUAL = "The array contains two objects with the same '%s ': [%d ] and [%d ]"
113114const MESSAGE_COLOR_WRONG_SIZE = "The color is %d element(s) long, when it should be 3 to 4"
114115const MESSAGE_COLOR_WRONG_TYPE = "Wrong type: expected 'integer' in the range [0, 255]"
115116const MESSAGE_COLOR_OUT_OF_RANGE = "%d is out of the range [0, 255]"
@@ -178,7 +179,10 @@ static func _error_as_text(error: Dictionary) -> String:
178179 Errors .ARRAY_BIGGER_THAN_MAX :
179180 error_as_text = MESSAGE_ARRAY_BIGGER_THAN_MAX % [error .size , error .max ]
180181 Errors .ARRAY_TWO_ELEMENTS_ARE_EQUAL :
181- error_as_text = MESSAGE_ARRAY_TWO_ELEMENTS_ARE_EQUAL % [error .element_1 , error .element_2 ]
182+ if error .has ("key" ):
183+ error_as_text = MESSAGE_ARRAY_TWO_KEYS_ARE_EQUAL % [error .key , error .element_1 , error .element_2 ]
184+ else :
185+ error_as_text = MESSAGE_ARRAY_TWO_ELEMENTS_ARE_EQUAL % [error .element_1 , error .element_2 ]
182186 Errors .COLOR_WRONG_SIZE :
183187 error_as_text = MESSAGE_COLOR_WRONG_SIZE % error .size
184188 Errors .COLOR_WRONG_TYPE :
You can’t perform that action at this time.
0 commit comments