mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
GDScript: Improve error messages for invalid indexing
These errors are very common when using an invalid property name or calling on an object of the wrong type, and the previous message was a bit cryptic for users. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com> Co-authored-by: golfinq <golfinqz@gmail.com>
This commit is contained in:
@@ -3,4 +3,4 @@ GDTEST_RUNTIME_ERROR
|
||||
>> on function: test()
|
||||
>> runtime/errors/constant_array_is_deep.gd
|
||||
>> 6
|
||||
>> Invalid set index '0' (on base: 'Dictionary') with value of type 'int'
|
||||
>> Invalid assignment of property or key '0' with value of type 'int' on a base object of type 'Dictionary'.
|
||||
|
||||
@@ -3,4 +3,4 @@ GDTEST_RUNTIME_ERROR
|
||||
>> on function: test()
|
||||
>> runtime/errors/constant_dictionary_is_deep.gd
|
||||
>> 6
|
||||
>> Invalid set index '0' (on base: 'Array') with value of type 'int'
|
||||
>> Invalid assignment of index '0' (on base: 'Array') with value of type 'int'.
|
||||
|
||||
Reference in New Issue
Block a user