Skip to content

Instantly share code, notes, and snippets.

@MarianoGnu
Created March 18, 2018 17:44
Show Gist options
  • Save MarianoGnu/1d615ce634b5bc9bbc35e8ff64df9f59 to your computer and use it in GitHub Desktop.
Save MarianoGnu/1d615ce634b5bc9bbc35e8ff64df9f59 to your computer and use it in GitHub Desktop.
tool
extends Resource
var sqlite_class = preload("res://lib/sqlite.gdns")
var sqlite = null
func _init():
if (!sqlite_class):
return;
# Initialize sqlite
sqlite = sqlite_class.new();
call_deferred("read_data")
func read_data():
var query = "";
var result = null;
# Open database file, here happens the error
if (sqlite.open_database("res://db/game_data.bd") != OK):
print("Cannot open database!")
return
#[...] More code that never gets executed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment