Results 1 to 3 of 3

Thread: My First Program - Errors?

  1. #1
    Join Date
    Jun 2007
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    My First Program - Errors?

    Hey all, I'm new. And this is my first script
    Code:
    program AutoTyperTrader;
    /////////////////////////////////////////////
    //   Types a designated message until      //
    //   someone tries to trade with you, then //
    //   accepts the trade and exits the       //
    //   script.                               //
    /////////////////////////////////////////////
    {.include SRL/SRL.scar}
    {.include SRL/SRL/misc/trade.scar}
    
    const SellingMessage = 'Flash1:Wave2:Selling 4k ess 30ea!! -- Chicken Kllr';
    
    procedure FoundTrade;
    begin
        If SomeoneTrades Then //Someone tries to trade with you.
           begin
                AcceptTrade;  //Accepts the trade.
                Exit;         //Exits The Script.
           end;
    end;
    
    procedure Talk(MessageToSay:String; //Like TypeSend, but waits a random
                                        //time before typing. Also I like
                                        //using the word 'talk' better. :)
    begin
         Wait(2000 + random(1000));
         TypeSend(MessageToSay);
    end;
    
    begin
         if (Not LoggedIn) then Exit;               //Exits it not logged in.
         repeat
               if SomeoneTrades Then FoundTrade;    //If someones trying to trade, do
                                                    //the procedure.
               Wait(1000 + random(2000);            //Waits a little before typing..
               Talk(SellingMessage);
         until(False);
    end.
    But I'm getting errors?
    Please, I need your help!

    -jbrauman (h)

  2. #2
    Join Date
    Jun 2007
    Location
    Kentucky, United States of America
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah I see it. Line 22. You're missing the ) after string. You'll still get an error asking for a comma at line 36, but I don't know what's wrong there. It's late, and I'm tired. I'll take a better look tomorrow. In line 31 and 18, I would change Exit to TerminateScript. Exit just exits the procedure or function. The latter will stop the script. Oh. . .try setting up SRL in your main loop too.

    PM me if you want a few hints or if nobody solves your other problem in line 36 soon, as I'm making one myself right now. I have a few ideas that could help you out.

    Good luck.

  3. #3
    Join Date
    Jun 2007
    Location
    Varrock East bank,
    Posts
    87
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You havn't set up SRL anywhere... and there isnt a main loop :O
    Shadows-Collide -
    http://i142.photobucket.com/albums/r...ollidesig1.jpg
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig.
    - Shadows-collide -
    -

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can't Run Program.. Dev-C++
    By Rs-Gp-4U in forum C/C++ Help and Tutorials
    Replies: 9
    Last Post: 05-29-2008, 03:35 PM
  2. C++ Program help, please.
    By Macro_FTW in forum C/C++ Help and Tutorials
    Replies: 8
    Last Post: 02-24-2008, 04:53 AM
  3. anyone know a program to...
    By zenma in forum News and General
    Replies: 2
    Last Post: 08-27-2007, 01:49 AM
  4. Help with my program
    By Damion in forum OSR Help
    Replies: 11
    Last Post: 08-18-2007, 02:43 AM
  5. What program do you use the most?
    By Fearlesssss in forum News and General
    Replies: 12
    Last Post: 06-16-2007, 01:56 AM

Posting Permissions

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