#Lua - Histories cannot have their value reassigned
1 messages · Page 1 of 1 (latest)
^ Incorrectly called the history a variable in the last example but you get the point
For ease, here is the test script:
set_history(testHistory, 0)
notify("Value of testHistory:" .. get_history(testHistory))
add_history(testHistory, 1)
notify("This should be 1 but it is " .. get_history(testHistory))
set_history(testHistory,1)
notify("This should also be 1 but is still " .. get_history(testHistory))
clear_history(testHistory)
set_history(testHistory, 1)
notify("I have cleared the variable and started fresh, it should be 1 but is still " .. get_history(testHistory))