Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid call. Nonexistent function 'new' in base 'GDScript'. #73

Closed
SirRamEsq opened this issue Feb 22, 2018 · 2 comments
Closed

Invalid call. Nonexistent function 'new' in base 'GDScript'. #73

SirRamEsq opened this issue Feb 22, 2018 · 2 comments

Comments

@SirRamEsq
Copy link
Contributor

SirRamEsq commented Feb 22, 2018

I've already solved this issue, I'm posting it here in case anyone else may run into it.

When trying to import a tile map I received the following error:
res://addons/vnen.tiled_importer/tiled_import_plugin.gd:108 - Invalid call. Nonexistent function 'new' in base 'GDScript'

This was strange because I had imported tilemaps before and the custom import script ran without issue and the postImport script looked fine in the editor.

As it turns out, earlier I had moved some constants into a GDScript file that is autoloaded by GODOT. I then tried to reference this autoloaded script inside the postImport TIled Script, but since the game isn't running at that point, the constants didn't exist. Even though everything looked good in the editor, the script failed, which caused the error.

What got me is that there was a good deal of time between when I had made this change and when I went to reimport a tilemap.

Hope this can help

@SirRamEsq
Copy link
Contributor Author

Closing out

@vnen
Copy link
Owner

vnen commented Feb 22, 2018

Yeah, this is a general issue with Godot, you can't call autoload scripts from the editor. See godotengine/godot#4236.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants