This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Wee bit o help needed

Old posts that have not been replied to for several years.
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

File was created before i made it.

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 :)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I have made one change to the script, you may wish to download it again.

1: After the bots has started, make a change using the !pic_set command.

2: Goto the shell, edit the database file, and look at what the contents are.

3: Issue a .restart

4: Edit the file again, and see fi the file changes.
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

[20:32:36] <Natsuki-Chan> [20:32] Tcl error [pub:potdinfo]: could not read "default": no such file or directory

{picoday default} < picoday.db.file

Updated the file to show what the script is now.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

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.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Damn, that toook longer than I thought.

Download again, I now have it working, and I don't know what I did to fix it though :P
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

Yup, it keeps the file stored after restart now :)

All i can say is a big thanks to you.
Locked