diff options
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
| -rw-r--r-- | modules/gdscript/gdscript.cpp | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 4d5d8cedde..b0d5422afe 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -126,10 +126,7 @@ GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argco  		GDScriptLanguage::singleton->lock->unlock();  #endif -		if (r_error.error != Variant::CallError::CALL_OK) { -			memdelete(instance); -			ERR_FAIL_COND_V(r_error.error != Variant::CallError::CALL_OK, NULL); //error constructing -		} +		ERR_FAIL_COND_V(r_error.error != Variant::CallError::CALL_OK, NULL); //error constructing  	}  	//@TODO make thread safe @@ -1779,10 +1776,11 @@ void GDScriptLanguage::get_reserved_words(List<String> *p_words) const {  		"remote",  		"sync",  		"master", +		"puppet",  		"slave",  		"remotesync",  		"mastersync", -		"slavesync", +		"puppetsync",  		0  	}; @@ -1979,6 +1977,10 @@ String GDScriptWarning::get_message() const {  			CHECK_SYMBOLS(4);  			return "The argument '" + symbols[0] + "' of the function '" + symbols[1] + "' requires a the subtype '" + symbols[2] + "' but the supertype '" + symbols[3] + "' was provided";  		} break; +		case DEPRECATED_KEYWORD: { +			CHECK_SYMBOLS(2); +			return "The '" + symbols[0] + "' keyword is deprecated and will be removed in a future release, please replace its uses by '" + symbols[1] + "'."; +		} break;  	}  	ERR_EXPLAIN("Invalid GDScript warning code: " + get_name_from_code(code));  	ERR_FAIL_V(String()); @@ -2018,6 +2020,7 @@ String GDScriptWarning::get_name_from_code(Code p_code) {  		"UNSAFE_METHOD_ACCESS",  		"UNSAFE_CAST",  		"UNSAFE_CALL_ARGUMENT", +		"DEPRECATED_KEYWORD",  		NULL  	};  |