Thanks for sharing the project, it was very easy to find the problem looking at it:
You have in your
Concept scene a
Sprite as root node and it has a script which is blank.
All scripts have to have an inheritance (the
extends ... part). It can be another script (put the path of the script, like
extend "res://myscript.gd") or an object (
If you don’t have an inheritance at all or it’s wrong (if you had, for example, a script in a
Sprite node that extended an
Area2D), it will not run and return this error.
It was not very explicit in the error message since it had no inheritance at all (this is why it was saying “inherits from native type ‘Reference’”. If you had, for example,
extends Area2D in that script, the error would be “Script inherits from native type ‘Area2D’, so it can’t be instanced in object of type: ‘Sprite’”.
To solve that you can or delete the script since it has no code or add
extends Sprite if you plan using this script in the future.
- I chose Node.Script → null
- I deleted the script, for me there isnt a Concept.gd
- If I had a script, it should be shown in the top-right corner as a small icon beside the Concept-Node! Nothing shows for me, that there is still a script!
There must be somthing wrong with the ide then.
mr.fies | 2019-01-27 07:29
Here was showing a script icon in the node which leads to a empty and nameless script. After removing it, the problem was solved. You are getting this error because a node has a script and the script extends the wrong object/don’t extends nothing at all.
fpicoral | 2019-01-27 14:17
yes I understood. For me the script-icon isn’t shown as I described AND I deleted the file. So there is no other way than making a new Project. Hope such a mistake will not appear later on, when the project becomes bigger.
Actually this is a big argument not to use godot. Nevertheless I will use it, because I like Godot. But when I have such an Error again and no solution, then I will quit Godot - would be pity.
mr.fies | 2019-01-27 16:34
Before deleting it, save as it is and re upload, just to I check it out again
fpicoral | 2019-01-27 16:35
I didnt change anything, I have a buckup of that project.
mr.fies | 2019-01-27 16:37
I used the Concept.tscn in the new Project, and had the same issue.
mr.fies | 2019-01-27 16:38
Deleting the project its never a solution. If there is a problem, search in the right place and you will find the cause of it.
Imagine if the project gets bigger and you run through a problem? Would you hope to it fix itself? It’s important to learn how to debug and understand the error messages.
If the error is the same, that is the problem, you have a script without the
extends ... part or it is wrong as I said before. Take a look at all your nodes with script and see if they match.
Of course, bugs with the engine can happen. If this is the case (what I doubt) you should create an issue on the GitHub page.
fpicoral | 2019-01-27 16:40
Wait 5 minutes from the time i’m posting this comment and see this video (you can’t open before because I’m uploading it rigth now) : https://youtu.be/myJWiGvZnc0
fpicoral | 2019-01-27 16:46
English is not my main language, so maybe I was not understandable. I think this is bad behaviour of Godot. I started the old Project again, and this time the field node-script was not null. I set it null several times, no script icon, the linked script-file doesnt exist.
mr.fies | 2019-01-27 16:49
Then try creating an empty script for it just with one line:
extends Sprite and try again
fpicoral | 2019-01-27 16:58
Thanks for your Video that showed me where you looked for the Script-Icon. That is what confused me before, because the Script-Icon was also shown next to the Scene-Icon before.
mr.fies | 2019-01-27 16:59
Ohhh now I got what you was doing, you were removing the script for the instance of that scene but it would still crash since when Godot tries to build the original scene, it crashed.
Yeah, debugging instanciated scenes you always want to look the original one.
fpicoral | 2019-01-27 17:03
Glad you got this fixed and learned a litte more about Godot xD
If you don’t have further questions related to this problem, please set the best answer to “close” this questions on the community.
fpicoral | 2019-01-27 17:04
thanks for your help ^^
mr.fies | 2019-01-27 17:05