temp() and tempPath() not working, or is it just me?
mork
Posts: 278
This throws an error for me:
// DAZ Studio version 4.9.4.117 filetype DAZ Script(function(){var foo = DzDir.tempPath();print(foo);// Finalize the function and invoke})();
Error:
Script Error: Line 5TypeError: Result of expression 'DzDir.tempPath' [undefined] is not a functionStack Trace: ()@:5
It might be on my side only, because I run DAZ through WINE on linux, but please don't stop reading just because I mentioned linux. :)
I'd like to know if someone can reproduce this error, please. :)
Edit: I need to mention that creating directories, files and copy files does work flawlessly.
Thank you very much
-mork
Post edited by mork on
Comments
I worked around it for now by using a environment variable (System.setenv, System.getenv). That works per session only, but better than nothing or writing to some random dir.
Just tried it myself, DS4.9.4.115, 64-bit, udner Win 8.1, and:
Thank you!
Why not use:
print(App.getTempPath())
Uhm, because that's too easy! Nah, just kidding, it works, thank you very much!
I'm still digging into the API, I saw that method on DzDir and did not know it is also on DzApp.
Thank you for that hint!
Ah I see, that is helpful to know, thank you!