mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Always use parentheses when calling assert() in GDScript
This is now required since Godot 3.2. This also adds an assert message to the Godot interfaces page to match its C# counterpart.
This commit is contained in:
@@ -64,7 +64,7 @@ Here is a complete class example based on these guidelines:
|
||||
return
|
||||
|
||||
var target_state = get_node(target_state_path)
|
||||
assert target_state.is_composite == false
|
||||
assert(target_state.is_composite == false)
|
||||
|
||||
_state.exit()
|
||||
self._state = target_state
|
||||
@@ -635,7 +635,7 @@ in that order.
|
||||
return
|
||||
|
||||
var target_state = get_node(target_state_path)
|
||||
assert target_state.is_composite == false
|
||||
assert(target_state.is_composite == false)
|
||||
|
||||
_state.exit()
|
||||
self._state = target_state
|
||||
|
||||
Reference in New Issue
Block a user