Good news is, she is retaining a variable now. But, as the default line did make it, the variable became...
{picoday default}
upon restart
What i was figuring is if instead of replacing the last line, which the script seems to have done, is to just check what the last line was, and extract the filename from there? As it would create some pseudo form of logging of what pictures have been used as the picture of the day. Will probably do some playing with writing to files tonight, see if i can figure getting info from lines and stuff
OK, the error you are getting is a fault on your part. As I have noted, the -init setting is to initilise the variable.
This is done in 1 of three ways.
1: If the variable allready exists, do not change the value, leave it as it is. This is for a .rehash.
2: If not, then check to see if it is in the file. If it is, set it to the value in the file.
3: If not in the file, use the default value given and save this to the file.
The default should only ever be used on the very first attempt, or the line has been deleted from the file.
The error given to you, says it is unable to find a file called default. Well, it's pretty damned obvious what the error means. You could do with a "file exists" check in the pub:picoday command.
You might also want to update my script again, I have made a change. However, I am abotu to go do some testing on it myself, because it is doing my head in.