I am new to ChatScript and I have the same issue that you discussed in this thread. I was able to comment out the SystemReset command in the C_Build procedure in the testing.cpp file and recompile the chatscript.exe so that the user facts persist between issuing build commands.
I am interested in using the ^export and ^import functions as well and I am having difficulty in implementing them. I am interested in learning more about the parameters of the functions and how the @setid is created. I just want to save all of the user facts created during the session to a single file and be able to read them in at the start of the next session. This way user specific info such as name of spouse can be persisted between sessions and system rebuilds. Why is the @setid necessary and I do not want to erase the facts from the fact table. If you are saving each fact after you create it to a file then how do you get the fact stored in a fact set in order to write it to a file. I am not interested in tables unless the chatbot can write new table rows for user specific facts without having to write an external program that would have to be called using the ^system funciton. Thanks.
Here is my test file:
topic: ~introductions []
t: ^noerase() [Hello] [Hi] [Hey], [talk] [speak] [say something] to me!
u: (my name is _*) ^noerase() ^repeat() $yourname = ‘_0 Nice to meet you _0.
?: (what is my name) ^noerase() ^repeat() Your name is $yourname.
s: (I like _*) ^noerase() ^repeat() $WhatYouLike = ‘_0 That’s amazing! I like _0 too!
^CreateFact($yourname like $WhatYouLike)
?: (what do I like $YourName ) ^noerase() ^repeat()
^Query(direct_sv $yourname like) You like @0object.
u: (import) ^noerase() ^repeat() Facts imported.
^import(testfacts.txt @0 noerase transient)
u:(export) ^noerase() ^repeat() Facts exported.
^Export(testfacts.txt @0)