Problem with saving to disk

Hi there,
I’m using Sugarcube.

I tried to save to disk with:

<<link "Save">>
	Save.export()
<</link>>

It won’t work. Nothing will happen. I expected an dialog to open asking me where I want to save.
Did I miss something important?
Saving through the standard dialog at the side bar works very well. Loading with an own link too.

I searched up and down but didn’t find a thing.

The Save.export() function uses your web-browser’s default “download file” behaviour to save the export file to your local hard-drive, so a “save download as” dialog will only be shown if your web-browser is configured to display one.

If you want to display an always available “in-game dialog” that asks the end-user for a file name before hand then you will need to use the Dialog API to create one

note: Such an export is also only possible if the web-browser / operating system / device type combination supports downloading files. eg. not always possible on mobile devices.

Beyond what Greyelf mentioned….

The Save API is JavaScript—thus, so is a call to Save.export(). You cannot simply paste it in like it’s markup or a macro. Try the following:

<<link "Save">>
	<<script>>
	Save.export();
	<</script>>
<</link>>

Thanks to both of you!

Indeed, with script macro it works fine!
So all API-stuff has to be in a script-macro? Is there an introduction to API in general at the documentation?
May I suggest to bring the example at the Save.export()-entry with the script-macro or semicolon?