godot-sqlite icon indicating copy to clipboard operation
godot-sqlite copied to clipboard

Could not find type "SQLite" in the current scope.

Open danieldantedev opened this issue 1 year ago • 16 comments

Environment:

  • OS: <Windows>
  • Godot version: <4.2>
  • godot-sqlite version: <4.3>

Issue description: when you put the plugin on Godot, create a node, put a script and simply put-> var db : SQLite, it says that "Could not find type "SQLite" in the current scope." i thought that i was doing something wrong, but when i open up the demo from this github, it happens the exact same, so i thought, oh i must have forgotten to click the plugin switch to "on", so i did that, and it changes nothing, i dont know what is going on, can someone help?

Steps to reproduce: put the plugin on Godot, create a node, put a script and simply put-> var db : SQLite, or var db : SQLite = null or something else similar, you can also just open the demo with a new version of Godot4.2 (gdscript)

thanks

danieldantedev avatar Apr 11 '24 03:04 danieldantedev

Hello, @danieldantedev,

What OS are you using? Are you using the normal version of Godot or the mono C# version?

2shady4u avatar Apr 11 '24 13:04 2shady4u

Windows 10, i'm using the normal version, i even thought that maybe my Godot was a little bit outdated and did the download again, but it wasn't, i literally open the demo project and i wasnt working just like my project, very very weird.

danieldantedev avatar Apr 11 '24 20:04 danieldantedev

Why can't I unsubscribe from this?

Cheers,

JG

On Fri, 12 Apr 2024 at 06:53, danieldantedev @.***> wrote:

Windows 10, i'm using the normal version, i even thought that maybe my Godot was a little bit outdated and did the download again, but it wasn't, i literally open the demo project and i wasnt working just like my project, very very weird.

— Reply to this email directly, view it on GitHub https://github.com/2shady4u/godot-sqlite/issues/174#issuecomment-2050520961, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOHKZDA45U6VMQ2GYZK3A3Y43Z4HAVCNFSM6AAAAABGBRQAF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQGUZDAOJWGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jgestiot avatar Apr 11 '24 21:04 jgestiot

Don't know if this gonna help but here it is some screenshots of the error using the demo.

danieldantedev avatar Apr 14 '24 23:04 danieldantedev

@danieldantedev Experienced same thing for a bit:

Turns out godot-sqlite <4.3> requires Godot 4.2.1, not 4.2, I was using 4.2

Maybe this is the issue for you as well.

image

Although this should fix it, this is probably due to the way the AssetLib is pulling plugin versions, as it let me pull in an unsupported version into Godot.

BC-Laboratories avatar Apr 15 '24 05:04 BC-Laboratories

unfortunately i'm using 4.2.1 stable, tested with other computer and it works fine, its something to do with my pc i think....

danieldantedev avatar Apr 16 '24 19:04 danieldantedev

I have the same issue, reinstalling made no difference. Edit: After reinstalling Godot it suddenly works 🤷‍♂️

thefenriswolf avatar Jul 08 '24 05:07 thefenriswolf

I had that error when exporting to android, but I disabled armeabi-v7a and x86 as mentioned here and it worked for me with Godot 4.2.2.

Iscalej avatar Jul 08 '24 18:07 Iscalej

Problem also exists with Godot 4.4.dev3, but not with Godot 4.4.dev2 (Win 11, i9-14900HX, RTX 4060 Laptop, godot-sqlite 4.4).

Did some digging: Both at startup as well as on exit of Godot, Godot seems to remove the extension from .godot/extension_list.cfg. However, if at startup no .godot folder was found or if you just undo the deletion while Godot is running, plugin works perfectly fine, no matter how often you launch the program (tested with demo project).

Here is Git Diff of .godot/extension_list.cfg after starting Godot with existing .godot folder, resp. after exit of Godot:

diff --git a/.godot/extension_list.cfg b/.godot/extension_list.cfg
deleted file mode 100644
index a90dbb9..0000000
--- a/.godot/extension_list.cfg
+++ /dev/null
@@ -1 +0,0 @@
-res://addons/godot-sqlite/gdsqlite.gdextension

Of course, as expected, for Godot 4.4.dev2, .godot/extension_list.cfg stays untouched. So maybe Godot has some problems at (de)initializing the plugin and tries to remove the trouble maker at startup/shutdown?

Seradir avatar Oct 05 '24 12:10 Seradir