| View previous topic :: View next topic |
| Author |
Message |
Football Master
Joined: 26 Dec 2008 Posts: 205 Location: Quakenet, #Football
|
Posted: Fri Dec 26, 2008 3:11 pm Post subject: Storage information |
|
|
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 |
|
| Back to top |
|
 |
Nimos Halfop
Joined: 20 Apr 2008 Posts: 80
|
Posted: Thu Jan 01, 2009 9:14 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Papillon Owner

Joined: 15 Feb 2002 Posts: 724 Location: *.no
|
Posted: Thu Jan 01, 2009 9:38 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|