Results 1 to 10 of 10

Thread: Ini's

  1. #1
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Ini's

    Where are the ini's saved ? becous ei cant get it to work heres my code:
    Code:
    Program new;
    var
    t : string;
    begin
      Writeini('Testsection', 'testkeyname', 'testnewstring', 'C:\Program Files\SCAR 3.21\Test.ini');
     t := readini('Testsection', 'testkayname', 'C:\Program Files\SCAR 3.21\Test.ini');
      writeln(t);
    end.

  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    I'm going to write a tutorial on them later, but for now, here's an example:

    SCAR Code:
    program New;
    var
      S : string;
     
    begin
      WriteINI('Test', 'String', 'Hello', AppPath + 'Test.txt');
      Wait(5000);
      S:= ReadINI('Test', 'String', AppPath + 'Test.txt');
      WriteLn(S);
    end.

    AppPath is where scar.exe is saved.

    Richard
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  3. #3
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Maybe you have to create the file.
    ~Hermen

  4. #4
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Quote Originally Posted by Hermen View Post
    Maybe you have to create the file.
    Nope. Run the example above, and it will work fine.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  5. #5
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you got testkay and testkey:P

    //edit
    tryed, it works.
    We merely play "against the rules". We cheat. Thats what we are good at, thats what we do.
    http://www.frement.net/srl/simba_user4.png

  6. #6
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK thansk this helped alot would this be a good way to have multiplayer svaing feature in a form?

  7. #7
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Quote Originally Posted by boredGamer View Post
    OK thansk this helped alot would this be a good way to have multiplayer svaing feature in a form?
    Yep.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  8. #8
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Actually, this is exactly what NiCbaZ and I did in our Soul Wars script. I can send you a copy of it so you can get an idea of how to do it, if you'd like.

    ~Sandstorm

  9. #9
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes pelase, I have a idea of the way i want it but i think i am using more code then it should be taking.(as it is my first script)
    Last edited by boredGamer; 09-05-2009 at 12:37 PM.

  10. #10
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Show us your code, then we can tell you whether it's needs shortening or not.

    Richard
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

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
  •