View Single Post
  #8  
Unread 11-13-2011, 08:30 PM
Equendil Equendil is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2011
Posts: 52
Quote:
Originally Posted by Queekusme
So how do i put that in the context of my code is it something like

Code:
local savedatax ={

        shortcut = quickslot1:GetShortcut()
        local type, data = shortcut:GetType(), shortcut:GetData()
                                    
	quickslot1SavData = type,data,
	          -- And then copy for the other shortcuts...
		}
That wouldn't work.

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 = {}
quickslot2SavData = {}
...
Code:
(...)
quickslot1SavData.type, quickslot1SavData.data = type, data
(...)
__________________
Author of LIP, Bootstrap and Baruk
Reply With Quote