My plugin outputs this error: Error! Couldn't write file 'data\surveymod/surveys/.txt'

Hello. I am working on a script, thats supposed to save the surveys.
But my console prints this when it try to save the files:

Error! Couldn't write file 'data\surveymod/surveys/.txt'

The problem is that it does not specify the filename.

Anybody who can help me? Thanks.

It would help if you pasted the code :slight_smile:

You don’t have a valid filename. You need something before the extension.