Results 1 to 9 of 9

Thread: Inventory Count

  1. #1
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Inventory Count

    For my vial wanker script i was using countdtm but i guess that was taken out in SRL 3.7 so now im using inventory count. Im not sure what its suposed to look like and i basicly have no clue so point out all my errors and i also was wondering for the number counter could i do something like if inventorycount(1-28)then begin?


    SCAR Code:
    function VialCountInventory: Boolean;
    var NumberOfInvVials: integer;
    begin
    InventoryCount:= NumberOfInvVials
    if InventoryCount(28)
    VialCount := True;
    end else
    if InventoryCount(0)
    Result := False;
     end;

  2. #2
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is this what you are trying to do?

    SCAR Code:
    function VialCountInventory: Boolean;
    var
      NumberOfInvVials: Integer;
    begin
      if InvCount = 28 then
        VialCount := True
      end else
      if InvCount = 0 then
        Result := False;
    end;

  3. #3
    Join Date
    Feb 2006
    Posts
    406
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    try including /misc/amount.scar
    and use CountItemsDTM

    usage:
    VialCount:=CountItemsDtm('inv',vialdtm):

  4. #4
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is that whatd it be like?
    and how do i try to look from from 1-28 as stated below


    SCAR Code:
    function VialCountInventory: Boolean;
    var NumberOfInvVials: integer;
    begin
    NumberOfInvVials:= CountItemsDtm('inv',UnVial)
    if NumberOfInvVials=28;//how would i add something like if number of vials is from 1-28?
    VialCount := True;
    end else

  5. #5
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    if NumberOfInvVials>1 and numberofinvvials<=28 then

  6. #6
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    but how would i put that in the code?
    and i keep getting error then excpected what am i doing wrong


    function VialCountInventory: Boolean;
    var NumberOfInvVials: integer;
    begin
    NumberOfInvVials:= CountItemsDtm('inv',UnVial)
    if NumberOfInvVials:=28;then
    begin
    VialCount := True;
    end else
    if InventoryCount(0)
    Result := False;
    end;

  7. #7
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    if NumberOfInvVials:=28;then

    copy this there
    if NumberOfInvVials>=1 and numberofinvvials<=28 then

  8. #8
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    now its saying type mismatch


    function VialCountInventory: Boolean;
    var NumberOfInvVials: integer;
    begin
    NumberOfInvVials:= CountItemsDtm('inv',UnVial)
    if NumberOfInvVials>=1 and NumberOfInvVials<=28 then
    begin
    VialCount := True;
    end else
    if InventoryCount(0)
    Result := False;
    end;

  9. #9
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    try this

    if (NumberOfInvVials>=1) and (NumberOfInvVials<=28) then

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Does Post Count..
    By TViYH in forum Discussions & Debates
    Replies: 5
    Last Post: 09-24-2008, 02:17 AM
  2. Count DTM
    By marre in forum OSR Help
    Replies: 6
    Last Post: 11-29-2007, 02:20 PM
  3. I cant count :o
    By Puffo in forum OSR Help
    Replies: 2
    Last Post: 11-25-2007, 03:14 PM
  4. How to count stacks in main inventory
    By lefamaster in forum OSR Help
    Replies: 1
    Last Post: 04-06-2007, 06:00 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
  •