|
|
Register •
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 6 posts ] |
|
| Author |
Message |
|
Yop_Solo
Gameop
Joined: Mon Jan 26, 2009 12:27 am Posts: 123
|
 write .txt
Hi,
In a While loop, could we use a write and make the name of the file change as the loop change... Yea, i got an array with name in it and would like to use it to name the .txt file.
I got an idea, but i would like to know, if there is a better idea. Ex : Set an array will all text file with extension and write VAR VAR/string
_________________ Dodger known as Yop Solo, Sysop twgsdodgerbbs.ath.cx http://cyberquebec.ca/_layout/?uri=http://cyberquebec.ca/twgsdodgerbbs/
|
| Sun Mar 08, 2009 2:04 am |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: write .txt
Yop_Solo wrote: Hi,
In a While loop, could we use a write and make the name of the file change as the loop change... Yea, i got an array with name in it and would like to use it to name the .txt file.
I got an idea, but i would like to know, if there is a better idea. Ex : Set an array will all text file with extension and write VAR VAR/string The following might work, might not: Code: setVar $i 1 while ($i <= $arraySize) setVar $j 1 while ($j <= 10) write $filename[$i] & ".txt" $somedata[$i][$j] add $j 1 end add $i 1 end
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Sun Mar 08, 2009 10:55 am |
|
 |
|
Vid Kid
Commander
Joined: Sun Feb 25, 2001 3:00 am Posts: 1838 Location: Guam USA
|
 Re: write .txt
Prom , looks like you forgot to SetVar $arraySize 2
for example
_________________ TWGS V2 Vids World on Guam Port 2002 Telnet://vkworld.ddns.net:2002 Discord @ DiverDave#8374 Vid's World Discord
Founding Member -=[Team Kraaken]=- Ka Pla
 Winners of Gridwars 2010 MBN Fall Tournament 2011 winners Team Kraaken Undisputed Champions of 2019 HHT Just for showing up!
The Oldist , Longist Running , Orginal Registered Owner of a TWGS server : Vids World On Guam
|
| Sun Mar 08, 2009 6:37 pm |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: write .txt
Vid Kid wrote: Prom , looks like you forgot to SetVar $arraySize 2
for example Yep, good catch.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Mon Mar 09, 2009 12:37 am |
|
 |
|
LoneStar
Commander
Joined: Fri Jun 09, 2006 2:00 am Posts: 1400 Location: Canada
|
 Re: write .txt
I, for one, would really like to see this script once it's done 
_________________ ---------------------------- -= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time. -= There are 10 types of people in the world: Those that understand Binary and those who do not -= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs? -= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark (R.I.P.)
|
| Mon Mar 09, 2009 8:16 am |
|
 |
|
Yop_Solo
Gameop
Joined: Mon Jan 26, 2009 12:27 am Posts: 123
|
 Re: write .txt
Thanks, i used that kind of script to write and it's working well.
_________________ Dodger known as Yop Solo, Sysop twgsdodgerbbs.ath.cx http://cyberquebec.ca/_layout/?uri=http://cyberquebec.ca/twgsdodgerbbs/
|
| Mon Mar 09, 2009 10:00 pm |
|
 |
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: Bing [Bot] and 25 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|