GDScript: Fix incorrect error message for utility functions
This commit is contained in:
parent
a574c0296b
commit
0c2202c56e
13 changed files with 167 additions and 59 deletions
|
|
@ -0,0 +1,3 @@
|
|||
func test():
|
||||
var x = Color()
|
||||
print(len(x)) # GDScript utility function.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
GDTEST_RUNTIME_ERROR
|
||||
>> SCRIPT ERROR
|
||||
>> on function: test()
|
||||
>> runtime/errors/gd_utility_function_wrong_arg.gd
|
||||
>> 3
|
||||
>> Error calling GDScript utility function "len()": Value of type 'Color' can't provide a length.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
func test():
|
||||
var x = Color()
|
||||
print(floor(x)) # Built-in utility function.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
GDTEST_RUNTIME_ERROR
|
||||
>> SCRIPT ERROR
|
||||
>> on function: test()
|
||||
>> runtime/errors/utility_function_wrong_arg.gd
|
||||
>> 3
|
||||
>> Error calling utility function "floor()": Argument "x" must be "int", "float", "Vector2", "Vector2i", "Vector3", "Vector3i", "Vector4", or "Vector4i".
|
||||
Loading…
Add table
Add a link
Reference in a new issue