how to save to file ?
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

how to save to file ?

Started by b_w_johan, 12 July, 2005, 12:09:00

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

b_w_johan

function TCPReceive(client,key)
  print(""..key.."|")
end

this part searches for string and prints what is shown.

now im looking for a way to save this string to a file.

tried to copy from other scripts. but somehow im not getting this saving to work.

can someone help with this??

giving correct code will be cool but with --editors notes
about what what does it would be even better =-p

its im realy hoping to get this to work then my public hublist can be released =-p, seems to work now =-p but only problem is its not saving its only printing in my program now =-p

Greetings b_w_johan
checkout http://wwhublist.com/index.php for my World Wide HubList project!

b_w_johan

im gonna even make it more difficult:-)

ok you get i want to "catch" the "..key.." and save that to file.

how can i "sort it out" before saving ..


$Key p|name|address|discrip|users|sharing|

i want the .conf file to be orden't at address

so the A will be above the B and so on =-p
checkout http://wwhublist.com/index.php for my World Wide HubList project!

b_w_johan

thank you pur you helped me saving the file now need to find out ordening
[12:31]
   filename = "./hublist.conf"
   local str = ""
    file = io.output(filename)
   file:write(str)
   file:close()

hope someone can help by organizing by address

greetings johan
checkout http://wwhublist.com/index.php for my World Wide HubList project!

Dessamator

QuoteOriginally posted by b_w_johan
im gonna even make it more difficult:-)

ok you get i want to "catch" the "..key.." and save that to file.

how can i "sort it out" before saving ..


$Key p|name|address|discrip|users|sharing|

i want the .conf file to be orden't at address

so the A will be above the B and so on =-p

what happens when u run out of alphabet letters?, by the way what does the key contain initially?
Ignorance is Bliss.

plop

build an array with all hub adresses, and do a table.sort(array) on that.
next parse the full table by looping the same array 2 index the table.
check public kick battle V2 for more hints, or any other script with stats/top10.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

SMF spam blocked by CleanTalk