MV Need a tip with this script call

Hi,
I'm using the CTB_file plugin (made by CT_Bolt).
Idk if I can post the plugin here and I tried to contact the developer, but he wasn't active in the last few weeks...
Since I really need this I try here...
The plugin can create a .txt file in a folder through this script call:

StorageManager.saveEx('/data/testdata.txt', 'hello world')

My questions are: how can I use a variable value as the .txt file name, and how can I use a variable value as the .txt file text?
Something like this (obviously wrong) script call:

StorageManager.saveEx('/data/$gameVariables.value(x).txt', '$gameVariables.value(x)')

There is a way to do something like this?
untested, but this should be the correct script call as long as you handle two things:

StorageManager.saveEx('/data/'+$gameVariables.value(x)+'.txt', $gameVariables.value(x))

The '' around the original script functions are string indicators. Which means for the second value you only have to make sure that a string is stored in the variable instead of a number.

and in the case of the filename you need string operations to construct the filepath from the three parts needed - and that is the only part that I might have gotten wrong.
In some languages, the + is a string operator and can be used like above - in other languages you'll need specific functions to combine two or more strings. And I don't know if the + works for javascript or not.
To answer your question, no you cannot post the plugin here. You can post a link to the creator's thread though.

You could also tag the creator just in case he/she gets email notification.

@ct_bolt ???
untested, but this should be the correct script call as long as you handle two things:

StorageManager.saveEx('/data/'+$gameVariables.value(x)+'.txt', $gameVariables.value(x))

The '' around the original script functions are string indicators. Which means for the second value you only have to make sure that a string is stored in the variable instead of a number.

and in the case of the filename you need string operations to construct the filepath from the three parts needed - and that is the only part that I might have gotten wrong.
In some languages, the + is a string operator and can be used like above - in other languages you'll need specific functions to combine two or more strings. And I don't know if the + works for javascript or not.
Tested! It works perfectly, thank you a lot!

To answer your question, no you cannot post the plugin here. You can post a link to the creator's thread though.

You could also tag the creator just in case he/she gets email notification.

@ct_bolt ???
Yes, he/she is the author! I sent him a private message, but I saw that he hasn't logged in since last month, so I just asked here too!
However the problem is solved^^

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/need-a-tip-with-this-script-call.133094/