Ayaka
28-04-2008, 04:55 PM
Search ain't my best friend tho it says 0 results on this question.
But how can I use a variable in a variable?
because i see in some scripts like
variable.[someothervariable]
somehow it doesn't want to work with me
if not PartyscanDBPC.DB.[scantypexxz] then
results in a massive exploding of error messages:
Date: 2008-04-28 16:41:06
ID: 51
Error occured in: Global
Count: 1
Message: ..\AddOns\Partyscan\Partyscan.lua line 193:
'<name>' expected near '['
Debug:
[C]: ?
AddOns:
Gatherer, v3.1.1
Ace2
Partyscan, v1.0
Swatter, v5.0.PRE.2966
because of this the script wont work at all.
Seems like it won't work
I need the variable from scantypexxz at PartyscanDBPC.DB.
so it would turn to PartyscanDBPC.DB.somevalue
It is for me mainly to shorten some procedures like
If ( scantypexxz == "Players" ) then
-- code regarding value players
elseif ( scantypexxz == "Members" ) then
-- code regarding value members
end
and lateron i wanted to use like PartyscanDBPC.DB.[scantypexxz].[uniqueID]
anyone knows whats going wrong?
Because if i look to the other scripts, it should work.
but he's now complaining about the '['
But how can I use a variable in a variable?
because i see in some scripts like
variable.[someothervariable]
somehow it doesn't want to work with me
if not PartyscanDBPC.DB.[scantypexxz] then
results in a massive exploding of error messages:
Date: 2008-04-28 16:41:06
ID: 51
Error occured in: Global
Count: 1
Message: ..\AddOns\Partyscan\Partyscan.lua line 193:
'<name>' expected near '['
Debug:
[C]: ?
AddOns:
Gatherer, v3.1.1
Ace2
Partyscan, v1.0
Swatter, v5.0.PRE.2966
because of this the script wont work at all.
Seems like it won't work
I need the variable from scantypexxz at PartyscanDBPC.DB.
so it would turn to PartyscanDBPC.DB.somevalue
It is for me mainly to shorten some procedures like
If ( scantypexxz == "Players" ) then
-- code regarding value players
elseif ( scantypexxz == "Members" ) then
-- code regarding value members
end
and lateron i wanted to use like PartyscanDBPC.DB.[scantypexxz].[uniqueID]
anyone knows whats going wrong?
Because if i look to the other scripts, it should work.
but he's now complaining about the '['