Author Topic: After each row, NewLine must be done  (Read 2027 times)

0 Members and 1 Guest are viewing this topic.

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
After each row, NewLine must be done
« on: 07 January, 2004, 17:12:02 »
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"

Code: [Select]
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    

PtokaX forum

After each row, NewLine must be done
« on: 07 January, 2004, 17:12:02 »

Offline SaintSinner

  • Lord
  • ***
  • Posts: 293
  • Karma: +1/-0
(No subject)
« Reply #1 on: 07 January, 2004, 17:20:11 »
try a

user:SendPM()
for every line
   


Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #2 on: 07 January, 2004, 17:36:08 »
Well, im not gonna send PM to anyone...
it will store that information in a xml file
Thanks anyhow :D
Guarding    

Offline pHaTTy

  • Forum Legend
  • ***
  • Posts: 1 916
  • Karma: +5/-1
(No subject)
« Reply #3 on: 07 January, 2004, 17:42:32 »
use /r/n i think it is :))
Resistance is futile!

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #4 on: 07 January, 2004, 17:53:55 »
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

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #5 on: 07 January, 2004, 22:01:35 »
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    

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #6 on: 08 January, 2004, 00:49:07 »
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 <----<<

PtokaX forum

(No subject)
« Reply #6 on: 08 January, 2004, 00:49:07 »