aboutsummaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_script.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-08-23 20:15:56 -0300
committerJuan Linietsky2015-08-23 20:15:56 -0300
commit07e97414250827c3b930befa123a4bbd48d24861 (patch)
tree8ec9872421ad333d3a1150ee64db1d0d27bd4269 /modules/gdscript/gd_script.cpp
parent9d185ccc30ad5fe7eb716390ca2e7f5c06574ce0 (diff)
downloadgodot-07e97414250827c3b930befa123a4bbd48d24861.tar.gz
godot-07e97414250827c3b930befa123a4bbd48d24861.tar.zst
godot-07e97414250827c3b930befa123a4bbd48d24861.zip
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
-rw-r--r--modules/gdscript/gd_script.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index 53ae0c870..99ddc74bb 100644
--- a/modules/gdscript/gd_script.cpp
+++ b/modules/gdscript/gd_script.cpp
@@ -2710,7 +2710,10 @@ GDScriptLanguage::~GDScriptLanguage() {
/*************** RESOURCE ***************/
-RES ResourceFormatLoaderGDScript::load(const String &p_path,const String& p_original_path) {
+RES ResourceFormatLoaderGDScript::load(const String &p_path, const String& p_original_path, Error *r_error) {
+
+ if (r_error)
+ *r_error=ERR_FILE_CANT_OPEN;
GDScript *script = memnew( GDScript );
@@ -2742,6 +2745,8 @@ RES ResourceFormatLoaderGDScript::load(const String &p_path,const String& p_orig
script->reload();
}
+ if (r_error)
+ *r_error=OK;
return scriptres;
}