Results 1 to 11 of 11

Thread: Until loads end script?

  1. #1
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Fixed

    Fixed
    Last edited by pl0xmypl0x; 08-28-2009 at 07:51 AM.

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

    Default

    Until(EndsScript = LoadsToDo)

    ~Sandstorm

  3. #3
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    that gave me a type mismatch error?

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

    Default

    Sorry, replace EndsScript with EndScript.

    ~Sandstorm

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

    Default

    := is used to assign a variable to something
    Example: Int := 5; Bool := True; String := 'AbCdE';

    = is used when checking if something is something.
    Example: if Int = 5 then, if Bool then, if String = 'AbCdE' then

    Exception is when using them as constants
    const String = 'AbCdE';
    Last edited by Zyt3x; 08-28-2009 at 05:27 AM.

  6. #6
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    And use >= just in case.

  7. #7
    Join Date
    Jul 2007
    Location
    Ohio
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I do a for to do statement, what i do is:
    SCAR Code:
    const
      LoadsToDo = 4;//loads to do :)
    SCAR Code:
    var
      i , Loads: Integer;//Global vars
    SCAR Code:
    begin
      Loads := LoadsToDo;
      for i := 0 to Loads do
      begin
        //rest of your stuff here,
        //i took out a lot of stuff that i have in my main loop
        //this is just the important stuff you need, tell me if you need help with anything or its not working :)

    ~King of the Nites

  8. #8
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i tried that and i keep getting a Type Mismatch error ? what is wrong with this?

    Bottom of mainloop:
    SCAR Code:
    Report;
     Until (EndScript >= Loadstodo)
     Logout;
    end.

  9. #9
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    EndScript and LoadsToDo need to be an Integer.. I'm assuming you did LoadsToDo in the const. Possibly you did LoadsToDo = '4365';? =X If so, then remove the (')'s and it'll work. But if it doesn't work, show whole script, please. (Or PM me if you want to keep it private).

  10. #10
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure MainLoop;
    Begin
      Repeat
        DoStuff;
        Bank;
        ProgressReport;
        Inc(Loads);
      Until (Loads >= LoadsToDo);
    End;

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  11. #11
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its fixed now, its what ian said XD i had '' where i shouldn't

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
  •