Created
March 18, 2018 17:44
-
-
Save MarianoGnu/1d615ce634b5bc9bbc35e8ff64df9f59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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