View Single Post
03/22/15, 03:38 PM   #6
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
EDIT: I had tried to open the saved variable file before to see what was in it, why it was getting so large but notepad++ always crashed. I got lucky this time & was able to open it & see what was getting saved in the scripts table.
Which now knowing what was in there I was able to find the problem.

This function calls ZO_ScrollList_CreateDataEntry
Lua Code:
  1. function Click4Info:UpdateScrollList(sourceTable)
  2.    ...
  3.    -- which calls:
  4.    local entry = ZO_ScrollList_CreateDataEntry(ROW_TYPE_ID, rowData, 1)  
  5.   ...
  6. end

Which causes some recursion here copying data into itself, data.dataEntry.data = data
Which I guess is ok for items in the game ? not sure why or what the purpose of that is ? but since the data object I was passing in was a table inside the saved variable file it was doing that recursion in the saved variable file saving data inside its self infinitely.

Lua Code:
  1. function ZO_ScrollList_CreateDataEntry(typeId, data, categoryId)
  2.     local entry =
  3.     {
  4.         typeId = typeId,
  5.         categoryId = categoryId,
  6.         data = data,
  7.     }
  8.     data.dataEntry = entry
  9.     return entry
  10. end

Saved Variable file scripts table:

Last edited by circonian : 03/22/15 at 03:59 PM.
  Reply With Quote