mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
parent
78d97b060a
commit
e59820ac94
2 changed files with 14 additions and 1 deletions
|
|
@ -840,8 +840,13 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va
|
|||
r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
|
||||
r_error.argument=0;
|
||||
r_ret=Variant();
|
||||
} else if(((String)(*p_args[0])).begins_with("/")) {
|
||||
r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
|
||||
r_error.argument=0;
|
||||
r_ret=RTR("Paths cannot start with '/', absolute paths must start with \'res://\', \'user://\', or \'local://\'");
|
||||
} else {
|
||||
r_ret=ResourceLoader::load(*p_args[0]);
|
||||
}
|
||||
r_ret=ResourceLoader::load(*p_args[0]);
|
||||
|
||||
} break;
|
||||
case INST2DICT: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue