Godot: "$" parse error for paths with math operands

Created on 12 Jun 2019  路  2Comments  路  Source: godotengine/godot

The get_node short hand $ has a bug where a valid node path that contains a math operand will try to perform math on the path and fail.

for instance:
$GUI/Panel/VSplitContainer/Label-2

produces the error:
Parse Error: Invalid operand types ('Node' and 'int') to operator '-'.

archived

Most helpful comment

I don't think it's a bug, you should use $"GUI/Panel/VSplitContainer/Label-2".

All 2 comments

I don't think it's a bug, you should use $"GUI/Panel/VSplitContainer/Label-2".

Yeah, in the same way you can't use spaces. This is just a limitation of $ without quotes.

Was this page helpful?
0 / 5 - 0 ratings