View Single Post
08-19-22, 06:09 PM   #10
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Hi Fizzlemizz

Thanks for your code chunks.
When I do a comparison I can see the changes and together with your explanation I can see how those changes make sense, (though it scares me that I was so far off when it came to the indexing).

I now have a question about accessing the global table
Lua Code:
  1. IronManCompleatedAchievements

I can see the table and I can access it in-game but when it comes to the update function it is throwing the following error:
Lua Code:
  1. 1x IronMan\IronMan-1.0.9.15.lua:539: attempt to get length of global 'IronManCompleatedAchievements' (a nil value)
  2. [string "@IronMan\IronMan-1.0.9.15.lua"]:539: in function `updateAchievementList'
  3. [string "@IronMan\IronMan-1.0.9.15.lua"]:1272: in main chunk
  4.  
  5. Locals:
  6. (*temporary) = <function> defined @SharedXML\SecureUIPanelTemplates.lua:258
  7. (*temporary) = IronManInterfaceScrollFrame {
  8. 0 = <userdata>
  9. ScrollBar = IronManInterfaceScrollFrameScrollBar {
  10. }
  11. offset = 0
  12. frames = <table> {
  13. }
  14. ScrollChildFrame = IronManInterfaceScrollFrameScrollChildFrame {
  15. }
  16. }
  17. (*temporary) = nil
  18. (*temporary) = nil
  19. (*temporary) = nil
  20. (*temporary) = nil
  21. (*temporary) = nil
  22. (*temporary) = nil
  23. (*temporary) = nil
  24. (*temporary) = nil
  25. (*temporary) = nil
  26. (*temporary) = "attempt to get length of global 'IronManCompleatedAchievements' (a nil value)"
  27. NumberList = <table> {
  28. scrollFrameRowWidth = 355
  29. interfaceTextureScale = 0.550000
  30. achievementFramePositionY = 150
  31. scrollAchievementTextBoxHeight = 30
  32. selectionButtonHeight = 45
  33. failTextBoxWidth = 190
  34. scrollParentGapX = 10
  35. scrollParentTopGap = -135
  36. interfaceTextureBoxSize = 50
  37. iconTextureX = -11
  38. iconAchievementTextureScale = 0.250000
  39. scrollParentWidth = 390
  40. dateNameTextBoxWidth = 500
  41. maxJumps = 100
  42. scrollFrameRowHeight = 80
  43. maxDeaths = 100
  44. scrollParentHeight = 350
  45. interfaceTextureGap = -50
  46. titleTextBoxWidth = 350
  47. titleTextBoxTopGap = -10
  48. scrollFrameWidth = 330
  49. metaAchievementFramePositionGapY = -40
  50. titleTextBoxHeight = 80
  51. dateTextBoxBottomGap = 5
  52. textBoxSpacerLeft = 0
  53. textBoxHeight = 190
  54. buttonSpacerBottom = -20
  55. selectionFrameScale = 1.200000
  56. achievementCloseButtonY = -6
  57. bottomLeftTextureX = -200
  58. insetSize = 5
  59. textBoxSpacerTop = 0
  60. selectionButtonWidth = 190
  61. iconTextureY = 30
  62. failTextBoxSpacerLeft = 200
  63. maxLevel = 19
  64. failTextBoxHeight = 80
  65. scrollAchievementTextBoxWidth = 300
  66. achievementFrameWidth = 600
  67. nameTextBoxBottomGap = -5
  68. bottomRightTextureX = 200
  69. metaAchievementTopGap = -8
  70. edgeSize = 20
  71. maxPlayed = 100
  72. iconTextureScale = 0.450000
  73. textBoxWidth = 190
  74. selectionFramePositionY = 150
  75. maxFails = 100
  76. scrollFrameNumberOfFrames = 4
  77. failTextBoxSpacerTop = 40
  78. selectionFrameHeight = 200
  79. buttonSpacerLeft = 200
  80. buttonSpacerTop = 30
  81. dateNameTextBoxHeight = 40
  82. achievementCloseButtonX = -5
  83. achievementFrameHeight = 160
  84. selectionFrameWidth = 480
  85. }

Why is it that I can query it in game but it is not available for this function?
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote