03-10-2016, 08:04 PM
This surely is something very obvious but I just don't get it
Code:
[10:59:23] LUA: Plugins/mmo/storage_sqlite.lua:59: attempt to index field 'DB' (a nil value)
[10:59:23] Stack trace:
[10:59:23] Plugins/mmo/storage_sqlite.lua(59): ExecuteCommand
[10:59:23] Plugins/mmo/main.lua(379): get_stats_initialize
[10:59:23] Plugins/mmo/main.lua(399): get_stats
[10:59:23] Plugins/mmo/main.lua(113): save_player
[10:59:23] Plugins/mmo/main.lua(81): (no name)
[10:59:23] Stack trace end
[10:59:23] Error in plugin mmo calling function <callback>()
Code:
function get_stats_initialize(Player)
local Success, ErrorMsg = cSQLiteStorage:ExecuteCommand("initialize_player",
{
player_name = Player:GetName()
},
function(stats_sql)
stats[1][Player:GetName()] = stats_sql
end
)
return stats
end