Merge pull request #12751 from bojidar-bg/11851-invalid-returns-count

Fix "Invalid outputs" error when calling a void method from visual script
This commit is contained in:
Rémi Verschelde 2017-11-09 09:55:50 +01:00 committed by GitHub
commit 5f805de6cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -858,6 +858,8 @@ public:
if (call_mode == VisualScriptFunctionCall::CALL_MODE_INSTANCE) {
if (returns >= 2) {
*p_outputs[1] = v.call(function, p_inputs + 1, input_args, r_error);
} else if (returns == 1) {
v.call(function, p_inputs + 1, input_args, r_error);
} else {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Invalid returns count for call_mode == CALL_MODE_INSTANCE";