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.

Storage information

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
F
Football
Master
Posts: 205
Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football

Storage information

Post by Football »

Hi, I`m looking for a tcl script that can store lines by my request like
when I type !addfixtures line1 bla
it will write bla on the first line of fixtures.txt so that I can write as much lines as I want on that file, of course I can also !del the file or !clear the file so it will be empty.

and if someone types !fixtures on the chat room, it will play the user fixtures.txt

anyone please?

thanks
N
Nimos
Halfop
Posts: 80
Joined: Sun Apr 20, 2008 9:58 am

Post by Nimos »

http://nimos.pastebin.com/m43a42a95

this should work...but !addfixture adds the line always at the END of the file, you cant set WHERE

!delfixtures [number] will remove a line (starting with "0" as first line number), if no [number] is specified, it will clear the whole file.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

not that hard to decide where to put the line in the file. just add the whole file to a list, with each line as an element. then do linsert where you want the file, before adding all the lines back to the file
Elen sila lúmenn' omentielvo
Post Reply