Results 1 to 6 of 6

Thread: #13

  1. #1
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default #13

    Here's what I have

    Code:
    procedure Save_Usernames(str: String);
    var
      theFile: Integer;
      tempStr: String;
    begin
      if (FileExists(ScriptPath + 'Yaboe_Usernames.txt')) then
      begin
        theFile := OpenFile(ScriptPath + 'Yaboe_Usernames.txt', false);
        ReadFileString(theFile, tempStr, FileSize(theFile));
        CloseFile(theFile);
      end;
    
      theFile := RewriteFile(ScriptPath + 'Yaboe_Usernames.txt', false)
      WriteFileString(theFile, Name + #13 + tempStr + str + #32#32#32#32#32 + FloatToStr(ext) + #32 + #13);
      CloseFile(theFile);
    end;
    The "Name" part is a constant. I need that to write to the top Only once. But instead I get it every time I run the script. Also the #13 I thought was suppose to go to the next line? that doesn't work either? Also, I am running windows OS. Also the ext part is and extended variable. And is this...

    Code:
    var
    ext: Extended;//global variable
    procedure blah;
    var Count : integer;
    begin
      Count := 0
      incEx(Count, 5)
      ext := Count * 0.01;
      ClearReport;
      AddToReport(FloatToStr(ext));
      Alert(FloatToStr(ext));
    This is what I get...

    Code:
    DeathDeathDeathStikser19877     0 Haepwar404     0 Seagetia075     0
    Death is my name part

    the other names + numbers is username

    the 0 is the ext.

  2. #2
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    try #10
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  3. #3
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    I read Coh3n saying that you needed #13#10 (or vice versa (or with a + in between the chars)). Try that?

  4. #4
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Well seeing as its windows use "#13#10"!

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  5. #5
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah you have to do #13#10 as #13 is carriage return and #10 is line feed.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  6. #6
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Windows use #13#10
    Linux use #10

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •