mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
GDScript: Fix incorrect error message for utility functions
This commit is contained in:
@@ -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".
|
||||
Reference in New Issue
Block a user