|
@@ -1374,12 +1374,13 @@ bool Main::start() {
|
|
|
} else if (res->is_type("Script")) {
|
|
|
Ref<Script> s = res;
|
|
|
StringName ibt = s->get_instance_base_type();
|
|
|
+ bool valid_type = !ObjectTypeDB::is_type(ibt,"Node");
|
|
|
ERR_EXPLAIN("Script does not inherit a Node: "+path);
|
|
|
- ERR_CONTINUE( !ObjectTypeDB::is_type(ibt,"Node") );
|
|
|
+ ERR_CONTINUE( !valid_type );
|
|
|
|
|
|
Object *obj = ObjectTypeDB::instance(ibt);
|
|
|
|
|
|
- ERR_EXPLAIN("Cannot instance node for autoload type: "+String(ibt));
|
|
|
+ ERR_EXPLAIN("Cannot instance script for autoload, expected 'Node' inheritance, got: "+String(ibt));
|
|
|
ERR_CONTINUE( obj==NULL );
|
|
|
|
|
|
n = obj->cast_to<Node>();
|