You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UPDATE: This problem only occurs when the source code contains inner classes
Before 4.0.Beta9, I could get a GDScript instance by GDScript.new() and then set the source_code property and then reload(), but now it throws an error
USER SCRIPT ERROR: Parse Error: Could not find script "".
at: GDScript::reload (built-in:1644)
In my software, I use the above method when the user modifies the code text, and then read the godot log to implement real-time error checking of the custom user script editor. But now this functionality is completely broken
Steps to reproduce
Create a GDScript instance by GDScript.new()
set the source_code property and then reload()
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
@Xwdit Please add a minimal reproduction project to the issue.
Xwdit
changed the title
GDScript.reload() which only sets the source code no longer works after 4.0.Beta9
GDScript.reload() which only sets the source code contains inner classes no longer works after 4.0.Beta9
Jan 10, 2023
Xwdit
changed the title
GDScript.reload() which only sets the source code contains inner classes no longer works after 4.0.Beta9
GDScript.reload() for GDScript only sets the source code which contains inner classes no longer works after 4.0.Beta9
Jan 10, 2023
Xwdit
changed the title
GDScript.reload() for GDScript only sets the source code which contains inner classes no longer works after 4.0.Beta9
GDScript.reload() for GDScript only sets the [source code which contains inner classes] no longer works after 4.0.Beta9
Jan 10, 2023
Xwdit
changed the title
GDScript.reload() for GDScript only sets the [source code which contains inner classes] no longer works after 4.0.Beta9
GDScript.reload() for GDScript which only sets the [source code that contains inner classes] no longer works after 4.0.Beta9
Jan 10, 2023
This is a regression coming from #69471. The analyzer tries to resolve the script using it's path, but as it's a runtime script, it has no script path.
Godot version
4.0.beta10
System information
Windows 11
Issue description
UPDATE: This problem only occurs when the source code contains inner classes
Before 4.0.Beta9, I could get a GDScript instance by
GDScript.new()
and then set thesource_code
property and thenreload()
, but now it throws an errorIn my software, I use the above method when the user modifies the code text, and then read the godot log to implement real-time error checking of the custom user script editor. But now this functionality is completely broken
Steps to reproduce
GDScript.new()
source_code
property and thenreload()
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: