-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preload() has different parsing rules from other function calls #52499
Comments
This seems to be already fixed in 4.0, extends Node
const default_env_okay := preload(
"res://default_env.tres"
)
@onready
var default_env_also_okay := load(
"res://default_env.tres"
) so it's quite possible that fixing this for 3.x will not be worth the time. |
I can take care of this issue. I've investigated it a little bit. |
Feel free to work on this 🙂 Note that we don't assign issues to people who aren't core contributors. This is because we'd prefer not to block other contributors if the assignee becomes inactive. |
I've made a Pull-Request #52521 with a fix of this issue. Please, review (there's only 1 commit with few lines 😊 ) |
I believe this ticket can be already closed. This was even mentioned in the changes of 3.4 beta 6 (https://godotengine.org/article/dev-snapshot-godot-3-4-beta-6) |
Fixed by #52521. |
Godot version
3.3.stable
System information
Windows 10
Issue description
preload()
in GDScript runs on a different ruleset than the usual parser and does not support newlines. When formatting a call to preload like:into:
it will report a parsing error about a misplaced \n, whereas any other function call support it just fine.
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: