Results 1 to 6 of 6

Thread: Not a problem just question. Usefull for others too

  1. #1
    Join Date
    Oct 2007
    Location
    brooklyn, new york
    Posts
    258
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Not a problem just question. Usefull for others too

    Ok, lets say we are making an autofighter script and want to update proggy or do something every certain amount of kills. Lets say every 15 kills i want to do something. I want to do the amount of kills divided by 15, if the remainder is 0 then proceed. Question is, how can i check the remainder?
    Whats the const/var or w/e for remainder?
    SCAR Code:
    if (AMOUNTofkills / 15 ) and remainder:=1 then

  2. #2
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    im not rele getting your question but heres what i would try

    if (amountofkills/15 = 1(or w/e u want) then;
    begin
    fjadshupfha
    end;

  3. #3
    Join Date
    Oct 2007
    Location
    brooklyn, new york
    Posts
    258
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by jpizzle View Post
    im not rele getting your question but heres what i would try

    if (amountofkills/15 = 1(or w/e u want) then;
    begin
    fjadshupfha
    end;
    Basically. 15/7 = 2.14.... How can i read the remainder?

    15/3 = 5 ... the remainder is 0 how can i read the remainder?

    What you have only works when there is 15 kills. I want EVERY 15 kills.

    Like if its divided by 15 and the remainder is 0, then its a multiple of 15.

  4. #4
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Code:
    program New;
    
    const
      timestoloop = 2;
    
    var
    dones,loadsdone:integer;
    
    procedure done;
    begin
      writeln(inttostr(dones));
    end;
    
    begin
      repeat
      dones := 0;
      repeat
        dones := dones + 1;
        done;
      until dones = 15;
      writeln('We have done the command 15 times!');
      loadsdone := loadsdone + 1;
      until loadsdone = timestoloop;
    end.
    it will do procedure dones 15 times then do what ever after. In this case I made it do it 2 times in all.
    I do visit every 2-6 months

  5. #5
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    if (TotalKills mod 15 = 0) then
    begin
    end;

    That?

    mod returns the remainder.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  6. #6
    Join Date
    Oct 2007
    Location
    brooklyn, new york
    Posts
    258
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Code:
    if (TotalKills mod 15 = 0) then
    begin
    end;


    That?

    mod returns the remainder.
    If mod divides and returns the remainder, then yes that. Thank you so much man

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
  •