Saving and loading help
Hiya,
For Kmabc 1.2 i am implementing saving and loading. But however, i am at a standstill:(. I am trying to save quickslot data to the plugindata but cannot get anywhere. the code so far is: Code:
local savedatax ={ Code:
Save.Click = function( sender , args ) thanks Queekusme PS. i get the file with the names in but no value to put into them. PPS. i know how to put plain text into the savedata file but not quickslot data so i request that people dont tell me this. |
the reason that is not working is because :GetShortcut() returns the class Turbine.UI.Lotro.Shortcut
which isn't the data you want this is what i do Code:
quickslot.ShortcutChanged = function(sender, args) |
I dont really understand this, what i want to do is save the data to the file so that it puts a hexcode there... how can i use this to make it do that?
|
Quote:
Do you use a bar plugin at all? If you do you should be able to extract the codes you need from its save data. Alternatively Quote:
|
So how do i put that in the context of my code is it something like
Code:
Code:
quickslot1:SetShortcut(Turbine.UI.Lotro.Shortcut(type value,data value)) -- type and data values called from the loadup process |
Quote:
Code:
local sc=Turbine.UI.Lotro.Shortcut(); |
Thanks for the help, i'll try this tomorrow, and i'll look into vindir....'s patch as encoding allways helps
thanks again Queekusme EDIT: thanks again for this but i never intended for there to be alias strings to be saved anyway, but thanks as this will prevent people complaining :) |
Quote:
If you write "a,b = x,y" a is set to the value of x and b is set the value of y. If you write "a =x,y" a is set to the value of x and y is discarded. In your case, 'quickslot1SavData' would be set to the value of 'type' and 'data' would be discarded. You could however, make your quickslotxSavData tables then set both type & data: Code:
quickslot1SavData = {} Code:
(...) |
So what you're saying is that i should save each piece seperately insted of in the same piece of information string.
i see where you are getting at, ok, i'll try this after my tea and homework tonight |
Quote:
If you write "quickslot1SavData = type,data", what the lua runtime does is "quickslot1SavData = type", and then it discards 'data'. See Lua Reference Manual Quote:
|
All times are GMT -5. The time now is 02:46 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI