ryobg / JContainers

JSON-based data structures for Papyrus - the TESV Skyrim SE scripting language
MIT License
107 stars 23 forks source link

Writing into JFormDB breaks JDB #77

Closed andrelo1 closed 3 years ago

andrelo1 commented 3 years ago

After writing into JFormDB using path ".myroot.value" I can't read/write values from JDB with the same root.

Example:

bool result

result = JDB.solveIntSetter(".test.value", 1, true)
Debug.Trace("result=" + result)
Debug.Trace("value=" + JDB.solveInt(".test.value"))

result = JFormDB.solveIntSetter(Game.GetPlayer(), ".test.value", 1, true)
Debug.Trace("result=" + result)
Debug.Trace("value=" + JFormDB.solveInt(Game.GetPlayer(), ".test.value"))

result = JDB.solveIntSetter(".test.value", 1, true)
Debug.Trace("result=" + result)
Debug.Trace("value=" + JDB.solveInt(".test.value"))

Output:

result=TRUE
value=1

result=TRUE
value=1

result=False
value=0

It breaks only if I use the same root for JFormDB and JDB.

andrelo1 commented 3 years ago

Nevermind, I found answer in documentation. I thought that JFormDB and JDB are not connected to each other, but it turned out that JFormDB is a container inside JDB.