Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
30ab5c9b
Unverified
Commit
30ab5c9b
authored
Apr 16, 2020
by
Rémi Verschelde
Committed by
GitHub
Apr 16, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #36868 from Calinou/improve-cli-script-error-message
Tweak the error message when trying to run an invalid script from CLI
parents
45a036fe
2ab9515b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
main.cpp
main/main.cpp
+2
-2
No files found.
main/main.cpp
View file @
30ab5c9b
...
...
@@ -1675,7 +1675,7 @@ bool Main::start() {
return
false
;
}
if
(
script_res
->
can_instance
()
/*&& script_res->inherits_from("SceneTreeScripted")*/
)
{
if
(
script_res
->
can_instance
())
{
StringName
instance_type
=
script_res
->
get_instance_base_type
();
Object
*
obj
=
ClassDB
::
instance
(
instance_type
);
...
...
@@ -1683,7 +1683,7 @@ bool Main::start() {
if
(
!
script_loop
)
{
if
(
obj
)
memdelete
(
obj
);
ERR_FAIL_V_MSG
(
false
,
"Can't load script '"
+
script
+
"', it does not inherit from a MainLoop type."
);
ERR_FAIL_V_MSG
(
false
,
vformat
(
"Can't load the script
\"
%s
\"
as it doesn't inherit from SceneTree or MainLoop."
,
script
)
);
}
script_loop
->
set_init_script
(
script_res
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment