mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Fix incorrect explanation of successful evaluation in Evaluating expressions (#5424)
This commit is contained in:
@@ -107,11 +107,11 @@ instance such as ``self``, another script instance or even a singleton::
|
||||
var expression = Expression.new()
|
||||
expression.parse("double(10)")
|
||||
|
||||
# This won't work, since we're not passing the current script as the base instance.
|
||||
# This won't work since we're not passing the current script as the base instance.
|
||||
var result = expression.execute([], null)
|
||||
print(result) # null
|
||||
|
||||
# This will work won't work, since we're not passing the current script
|
||||
# This will work since we're passing the current script (i.e. self)
|
||||
# as the base instance.
|
||||
result = expression.execute([], self)
|
||||
print(result) # 20
|
||||
|
||||
Reference in New Issue
Block a user