Screenshot command from a GUI Button into photo library?

I’m trying to create a button on Unity, that will give the command to create screenshot of my screen.
I think I have the file directory,

private/var/root/Media/DCIM/100APPLE (or ~/Media/DCIM/100APPLE)

Correct me if I’m wrong please. Doing my research I have the following code but if it is the right code I’m still unsure where to put the file directory. All help is appreciated.

}

3 of the top 5 iOS threads are about the same thing, why did you feel the need to make a new thread?

File.WriteAllBytes("private/var/root/Media/DCIM/100APPLE/" + "[The name I want the screenshot to be named].png", bytes);

Don’t put Application.dataPath, as that’s a different path entirely than the path to photos, and attaching the path to your app onto the path to photos just creates a really mangled path.

I have tried what you said replacing the bottom text, and still I’m having errors that Unity wont build to iOS

You’ll need to explain what these errors are before anyone can assist in solving these errors.
What steps do you take?
What errors are reported?
If clicking on them takes you to a specific line in a script, can you provide at least a pertinent segment of the related script?

is what I have in the GUI Button script and these are the errors,

I am reasonably new to Unity/Javascript but have an understand about code, but I’ve been check in the deep end!
I appreciate your help.

That errors is because there are other errors in the list.

Go to Window-> Console and list ALL the errors. The one you listed merely points out there are others.

If that’s the script as it is, * * is not valid syntax.

We removed the * * when putting it into the script, My other machine as the Unity Pro License so I’m unable to test it till tomorrow,
I shall continue this post tomorrow and would appreciate your input Ntero.
Many thanks.