Added expression nodes to visual script, please test.

This commit is contained in:
Juan Linietsky 2016-09-04 10:34:40 -03:00
parent 77cb836fc4
commit 9167cd45bb
6 changed files with 1727 additions and 6 deletions

View file

@ -1909,17 +1909,21 @@ Variant VisualScriptInstance::_call_internal(const StringName& p_method, void* p
if (node && (r_error.error!=Variant::CallError::CALL_ERROR_INVALID_METHOD || error_str==String())) {
if (error_str!=String()) {
error_str+=" ";
}
if (r_error.error==Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
int errorarg=r_error.argument;
error_str="Cannot convert argument "+itos(errorarg+1)+" to "+Variant::get_type_name(r_error.expected)+".";
error_str+="Cannot convert argument "+itos(errorarg+1)+" to "+Variant::get_type_name(r_error.expected)+".";
} else if (r_error.error==Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
error_str="Expected "+itos(r_error.argument)+" arguments.";
error_str+="Expected "+itos(r_error.argument)+" arguments.";
} else if (r_error.error==Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
error_str="Expected "+itos(r_error.argument)+" arguments.";
error_str+="Expected "+itos(r_error.argument)+" arguments.";
} else if (r_error.error==Variant::CallError::CALL_ERROR_INVALID_METHOD) {
error_str="Invalid Call.";
error_str+="Invalid Call.";
} else if (r_error.error==Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
error_str="Instance is null";
error_str+="Base Instance is null";
}
}