Results 1 to 3 of 3

Thread: Cases O_o.

  1. #1
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default Cases O_o.

    uhm, okey guys i actually never ask for help at the forums , but this one is kinda weird.

    SCAR Code:
    Players[CurrentPlayer].Integers[10] := GetSkillInfo('mining', False);
      Writeln(Players[CurrentPlayer].Integers[10]);
      Wait(100);
      Players[CurrentPlayer].Integers[15] := GetSkillInfo('attack', False);
      if (not(MiningSetup('iron'))) then
      begin
        Case (Players[CurrentPlayer].Integers[10]) of
          9..1 : IncEx(WaitTime, 200);
          29..10 : IncEx(WaitTime, 150);
          49..30 : IncEx(WaitTime, 100);
          50..99 : IncEx(WaitTime, 35);
        end;
      end else
      begin
        Case (Players[CurrentPlayer].Integers[10]) of
          14..1 : StopReason('Higher mining is necessary, Terminating Script...');
          29..15 : IncEx(WaitTime, 200);
          49..30 : IncEx(WaitTime, 125);
          50..99 : IncEx(WaitTime, 50);
        end;
      end;
      FindPickHeadColor;
      Writeln(Waittime);

    Its supposed to change WaitTime to the specified mining level, but writelns never lie , here's my debug:

    21
    PickColors = [1715257,1715257,1583156,1583156,2243147];
    0

    Cases ftl ?
    Hi

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Your cases should go from lower to higher - 1..9 instead of 9..1
    Last edited by Naum; 07-28-2009 at 07:17 PM.

  3. #3
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Your cases should go from lower to higher - 1..9 insted of 9..1
    omg lol XD, okey i'll try that.

    E: thx, i works lol, i wonder how i couldn't see that.
    Hi

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
  •