How to use this
#1

I was reading through a script and i came across this line
Код:
djAutocommit(true);
I'm not sure how to use it. Any help?
Thanks
Reply
#2

Basically when using djson it can either write something to the file one at a time, so everytime you have djSet(), djSetInt(), djSetFloat() it will write to the file or you can have it write everything at once. If you want it to write everything at once you do djAutocommit(false) before djSet, etc. Then at the end do djCommit() and djAutocommit(true) after that. If you want it to write one at a time then don't put djAutocommit anywhere. It's really used if you are saving a lot of data at once so you don't write to the file a bunch of times, only once.

Hope that was clear enough it's a bit weird to explain haha
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)