Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-03-10, 05:54 AM   #1
dr_AllCOM3
A Cyclonian
 
dr_AllCOM3's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 40
Variables problem

Code:
local a = {}
a[1] = 1
a[2] = 2
Goal:
Code:
a[1] = 2
a[2] = 1
I want those two to switch their values, but it seems like I always end up with references and both having the same value.
What is the correct way to do it?

Thanks
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Variables problem


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off