Loading data issues
Perhaps someone can explain to me, what I am doing wrong...
Loading data worked right fine for some time, but since the amount of data got quite huge, I tried to split these data to various files on disc. Loading works quite fine, except it takes ages (and sometimes leads to server-disconnects for too long loading time). So I tried to split the loading between startup and runtime. If I load all data at startup, there is no difference, but if I try to load some data during runtime, the load routine finishes, with no data returned. Code:
dataload=VindarPatch.PatchDataLoad(Turbine.DataScope.Server,"filename",load_done) Perhaps I'm getting this wrong, but I think, 'load_done' should be called when the data was loaded, and if I try to access the data in the function load_done, it is always >nil< Code:
function load_done() Any help on getting the data loaded? |
The underlying Turbine.PluginData.Load functions differently when the plugin is loading and during runtime. When the plugin loads, the data is returned as the result of the function. During runtime, however, the data is not made available immediately so the return value of the function is simply "nil". Instead, the data is passed to the callback function as the first parameter of the callback. For the callback, you should be using something like:
Code:
function load_done(dataload) |
Many thanks, it works...
I got it that this function behaves differently, but I could not figure out, how I can make use of that. You made my day, Garan. |
All times are GMT -5. The time now is 03:52 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI