gdsqlite-native icon indicating copy to clipboard operation
gdsqlite-native copied to clipboard

"Invalid call. Nonexistent function 'new' in base 'GDNativeLibrary'." Error

Open burakyucel07 opened this issue 6 years ago • 5 comments

I'm writing the code like this:

const SQLite = preload("res://lib/gdsqlite/gdsqlite.gdnlib") var db = SQLite.new()

But it says, "Invalid call. Nonexistent function 'new' in base 'GDNativeLibrary'.".

Any suggestions?

burakyucel07 avatar Oct 13 '18 01:10 burakyucel07

~~Sounds like something failed while loading the GDNative library.~~ Read the EDIT

  1. Can you specify your operating system and your version of Godot? (If you're building from master, name the commit)
  2. Can you run your project from command line and copy any errors and post them here?

EDIT: Actually, replace "res://lib/gdsqlite/gdsqlte.gdnlib" with "res://lib/gdsqlite.gdns". The new method is within the NativeScript resource, not the GDNativeLibrary resource.

TGRCdev avatar Oct 13 '18 07:10 TGRCdev

Now it says: Invalid call. Nonexistent function 'open' in base 'Reference (gdsqlite.gdns)'. I'm using Godot 3.0.1 and Windows 8.1 or OSX High Sierra. How can I run my project from command line?

On Mac, it says "Attempt to call function 'new' in base 'NativeScript' on a null instance."

burakyucel07 avatar Oct 13 '18 11:10 burakyucel07

I fixed the function as "open_db" and it works! But it still doesn't work in OSX. I wonder if it works in Linux, because my server will be on Linux, if it doesn't work on Linux, I can't use it.

burakyucel07 avatar Oct 13 '18 13:10 burakyucel07

OSX is not supported yet (#22), but I can confirm that the current build works on Windows 10 64-bit and Ubuntu 18.04. If your server is on Linux, the plugin will work fine.

TGRCdev avatar Oct 13 '18 16:10 TGRCdev

Thank you so much.

burakyucel07 avatar Oct 14 '18 08:10 burakyucel07