I have a file named test.plugindata saved at C:\Users\Username\Documents\Th e Lord of the Rings Online\PluginData\AccountName\ AllServers.
The file contains the following data:
If I want to access the data, I can do this with:
Code:
import "Turbine";
data = Turbine.PluginData.Load(Turbine.DataScope.Account, "test");
Turbine.Shell.WriteLine(tostring(data));
But what if I want to MANUALLY access data?
Code:
import "Turbine";
import "Turbine.UI";
import "Turbine.UI.Lotro";
window = Turbine.UI.Window();
window:SetSize(300, 300);
window:SetPosition(300, 300)
window:SetBackColor(Turbine.UI.Color(0,0,0));
window:SetVisible(true);
button = Turbine.UI.Lotro.Button();
button:SetParent(window);
button:SetSize(100, 20);
button:SetPosition(100, 100);
button:SetText("Load");
button.MouseClick = function()
data = Turbine.PluginData.Load(Turbine.DataScope.Account, "test", dataLoadCompleteEventHandler);
end
dataLoadCompleteEventHandler = function()
Turbine.Shell.WriteLine(tostring(data));
end
Why does loading data work as expected when the plugin is loading (returns "Hello") but not when it's already running (returns "nil")? Am I missing something?
Any help would be greatly appreciated!