View Single Post
11/18/14, 12:30 PM   #1
SnowmanDK
 
SnowmanDK's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 161
Converting Bank Manager Revived from LAM-1.0 to LAM-2.0

I am puzzled about a problem I have.

The code using LAM-1.0 is this:
Lua Code:
  1. for k,craftKey in pairs(blackSmithingRules) do
  2.         lam:AddDropdown(panelID, craftKey.."#"..numProfile, getTranslated(craftKey), "", getTranslateTable(sendingType),
  3.         function() return getTranslated(BankManager.Saved[craftKey][numProfile]) end,
  4.         function(val) changeTranslateTable(val,craftKey,numProfile) end)
  5.     end
I was hoping to convert it to 2.0 like this:
Lua Code:
  1. for k, craftKey in pairs(blackSmithingRules) do
  2.         {--[17.x]
  3.             type = "dropdown",
  4.             name = getTranslated(craftKey),
  5.             choices = getTranslateTable(sendingType),
  6.             getFunc = function() return getTranslated(BankManager.Saved[craftKey][numProfile]) end,
  7.             setFunc = function(value) changeTranslateTable(value,craftKey,numProfile) end,
  8.         },
  9.     end
Sadly I get an error saying: unexpected symbol near 'for'.

Any idea how I can fix this?

Last edited by SnowmanDK : 11/18/14 at 01:38 PM.
  Reply With Quote