Results 1 to 5 of 5

Thread: Case difficulties.

  1. #1
    Join Date
    Sep 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Case difficulties.

    My script never seems to be able to solve this case:

    SCAR Code:
    case Players[CurrentPlayer].Strings[0] of
      'mithril': begin
                   writeln('o.0 finally made it here');
                   FWithdrawOre(MithrilOreDTM, 'ithril', 5);
                   FWithdrawOre(CoalDTM, 'oal', 20);
                   writeln('finished with "mithril" case');
                 end;
      'adamantite': begin
                      FWithdrawOre(AdamantiteOreDTM, 'damantite', 3);
                      FWithdrawOre(CoalDTM, 'oal', 18);
                    end;
      'runite': begin
                  FWithdrawOre(RuniteOreDTM, 'unite', 3);
                  FWithdrawOre(CoalDTM, 'oal', 24);
                end;
      end;

    It's remotely possible that the problem is some were else, but almost certain that it has something to do with these lines. Just for grins though, this is what my player declaration looks like:

    SCAR Code:
    CurrentPlayer    := StartPlayer;          //Sooo, what player will start 'er off?
      NumberOfPlayers(HowManyPlayers);

      Players[0].Name        := 'Username';      //Username
      Players[0].Pass        := 'Password';      //Password
      Players[0].Nick        := 'Nickname';      //3-4 consecutive letters of your username, (ex: "Nickname" -> "ick").
      Players[0].Pin         := '0000';          //You're four-digit bank pin... (0000 if none)
      Players[0].Strings[0]  := 'veb';           //Search for "OpenBankQuiet" in the SRL Manual for a list of valid arguments.
      Players[0].Strings[1]  := 'mithril';       //What type of bar will you be superheat? ("mithril", "adamantite" or "runite").
      Players[0].Strings[2]  := 'Prayer';        //Which skill would you like to use Genie Lamps etc on, (if any are recieved).
      Players[0].Active      := True;            //Say, are you going to use this player?
      Players[0].Integers[0] := 100;             //How many Bars would you like this player to superheat?

    Any suggestions?
    Current Project - Superheater :: Mithril Bars - Should be ready for Members application soon

  2. #2
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you have Players[CurrentPlayer].Strings[0] for your case and that is your bank array. Change it to Players[CurrentPlayer].Strings[1]

  3. #3
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes. Change it to Strings[1] and you'll be ok.

  4. #4
    Join Date
    Sep 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Gah! how embarrassing, sorry about that
    Current Project - Superheater :: Mithril Bars - Should be ready for Members application soon

  5. #5
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Don't be sorry. It's no problem to help somebody out. That is the reason for this forum, to get help.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Difficulties with creating a file...
    By Macros in forum OSR Help
    Replies: 6
    Last Post: 01-21-2009, 12:37 AM
  2. Having some slight difficulties
    By Raskolnikov in forum OSR Help
    Replies: 1
    Last Post: 01-04-2008, 10:17 PM
  3. Using Case and Of
    By Fourscape in forum Outdated Tutorials
    Replies: 3
    Last Post: 08-18-2007, 08:40 PM
  4. Case - Else
    By stylen in forum OSR Help
    Replies: 0
    Last Post: 05-30-2007, 11:54 PM
  5. Case OF
    By Jagex_Fagex in forum News and General
    Replies: 3
    Last Post: 10-25-2006, 08:45 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
  •