After each row, NewLine must be done
 

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

After each row, NewLine must be done

Started by kepp, 07 January, 2004, 17:12:02

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kepp

This works OK, but i would like it to read a new line like this,
etc:

Welcome to: bla bla bla
Online Users : 241
more
more

And not like this, Welcome to : bla bla bla  Online Users : 241  more  more

And while im on it, If there's a better way to line up evrything, So i can break the line for instance

OutPut = "Welcome to
                 bla bla bla"

function Main()
   SetTimer(10*60000)
   StartTimer()
   S1 = "Welcome To : "..frmHub:GetHubName()
   S2 = "Online Users : "..frmHub:GetUsersCount()
   S3 = "Hub Description : "..frmHub:GetHubDescr()
   S4 = "Redirect Address : "..frmHub:GetRedirectAddress()
   S5 = "Max Users : "..frmHub:GetMaxUsers()
   S6 = "Minimum Share : "..frmHub:GetMinShare()
   S7 = "Current Share Ammount : "..frmHub:GetCurrentShareAmount()
   OutPut = S1.."\r\n"..S2.."\r\n"..S3.."\r\n"..S4.."\r\n"..S5.."\r\n"..S6.."\r\n"..S7
end


function OnTimer()
   file = "test/test.xml"
   remove(file)
   local handle = openfile(file,"a")
   write(handle, OutPut, "\n\n")
   closefile(handle)
end
Guarding    

SaintSinner

try a

user:SendPM()
for every line
   


kepp

Well, im not gonna send PM to anyone...
it will store that information in a xml file
Thanks anyhow :D
Guarding    

pHaTTy

use /r/n i think it is :))
Resistance is futile!

NightLitch

a little improvment for you istead of:

S1, S2 etc.

change it to this:


local msg = ""

msg = msg.."\r\n Lines here "
msg = msg.."\r\n Lines here "
msg = msg.."\r\n Lines here "
msg = msg.."\r\n Lines here "
msg = msg.."\r\n Lines here "

OutPut = msg


try it...
//NL

kepp

Thanks for that nightlitch!!

hmm.. Yea, i use \r\n But it won't end up like it when it's in that files :S
Guarding    

plop

play a bit with tabs  \t in scripted lines or normal tabs in the file.
that can make it all look nices but it can screw up if the user (i'm 1 of them) changed the default font.

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