Results 1 to 6 of 6

Thread: 3 second problem

  1. #1
    Join Date
    Aug 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default 3 second problem

    ok, im getting an invalid number of parameters error, i know what this is usually caused by but i need a bit more specific answer my problem if anyone has about 3 seconds to look at this.

    i have rodcolor set as a global var

    Code:
    Procedure RodCheck;
    var
    o : integer;
    Begin;
    for o:= 1 to 2 do
    case o of
      1:Rodcolor:=FindFishingEquipmentColor('FlyFishingRod');
      2:FindFishingEquipment(Rodcolor,'FlyFishingRod');
    end;
    end;
    in my main loop i have

    Code:
     if findfishingequipment then   //this is the line with the problem
     begin;
    i know this is likely to annoy many of you, but i have pretty much drawn a blank.

    also, is this an acceptable place to use a case? or could it be done by a more efficient method?

  2. #2
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function FindFishingEquipment(FishingEquipmentColor: Integer; FishingEquipmentName: string): Boolean;

    You have it correct in your case function, which is what i would use, to answer your question about using Cases there...
    Here is what you have in your case:
    SCAR Code:
    2:FindFishingEquipment(Rodcolor,'FlyFishingRod');

  3. #3
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    yeah should be

    SCAR Code:
    if FindFishingEquipment(Rodcolor,'FlyFishingRod') then
      begin

    in your main loop

  4. #4
    Join Date
    Oct 2006
    Location
    MI USA
    Posts
    3,166
    Mentioned
    6 Post(s)
    Quoted
    11 Post(s)

    Default

    Cases start with 0 ?


  5. #5
    Join Date
    Aug 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow, ok wow, thanks for wasting your time with me, lol...

    and ram_rune, my cases will always start with 0 now

  6. #6
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    1,330
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by RAM_RUNE View Post
    Cases start with 0 ?
    They dont have to i hate starting mine with 0. Although it is good practice to as everything has to start with zero or SHOULD start with zero such as arrays.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. problem...
    By Blumblebee in forum OSR Help
    Replies: 4
    Last Post: 12-28-2008, 07:22 AM
  2. help big problem
    By goblanca in forum OSR Help
    Replies: 3
    Last Post: 05-19-2007, 10:41 PM

Posting Permissions

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