Results 1 to 4 of 4

Thread: InvEmpty not working?

  1. #1
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default InvEmpty not working?

    Ok so I have
    Simba Code:
    Procedure NoFood;
    begin
      If InvEmpty then
      begin
        WriteLn('No Food');
        Wait(500);
        WriteLn('Walking To Bank');
      end;
    end;

    just to check if I have no food for my
    Simba Code:
    repeat
    until(NoFood);
    loop in my fighting script but so far it attacks a monster and then it thinks my inventory is empty right away even thought I have a full inventory? maybe I'm doing it wrong?
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Your procedure needs to be a function that returns True or False.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    You need to make the procedure into a FUNCTION!
    Functions return a value.
    In this case we want a Boolean (True or False)

    Simba Code:
    Function NoFood:Boolean;
    begin
      Result:=InvEmpty;
      If Result Then
      begin
        WriteLn('No Food');
        Wait(500);
        WriteLn('Walking To Bank');
      end;
    end;

    I believe that should do it!

  4. #4
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh sorry thanks haha I'm still a beginner

    thanks for the really fast help though guys
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

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
  •