From 3a1b7c01c768011d47d4207e5a324a4ddd6e9b6f Mon Sep 17 00:00:00 2001 From: Alexander Pavlenko Date: Fri, 2 Aug 2019 22:33:48 +0300 Subject: [PATCH] Update gdscript_basics.rst --- getting_started/scripting/gdscript/gdscript_basics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getting_started/scripting/gdscript/gdscript_basics.rst b/getting_started/scripting/gdscript/gdscript_basics.rst index 0a47e87e2..03691be43 100644 --- a/getting_started/scripting/gdscript/gdscript_basics.rst +++ b/getting_started/scripting/gdscript/gdscript_basics.rst @@ -601,7 +601,7 @@ If the value is not a subtype, the casting operation will result in a ``null`` v :: var my_node2D: Node2D - my_node2D = $Button # Results in 'null' since a Button is not a subtype of Node2D + my_node2D = $Button as Node2D # Results in 'null' since a Button is not a subtype of Node2D For built-in types, they will be forcibly converted if possible, otherwise the engine will raise an error.