Results 1 to 13 of 13

Thread: Help

  1. #1
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help

    This sounds like a dumb question for me to ask becuase I feel like I am stupid for not knowing this but if you have this in a procedure...

    Code:
    if bla bla bla then
        Continue?
    I want the continue to make it not do the procedure but move on in the main loop. Is there a way to do this?
    Still learning to code in Simba.

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Would be easier to help if you post the rest of the code.

  3. #3
    Join Date
    Jun 2008
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    just like you have it. for example

    Simba Code:
    for i:=0 to 2 do
    begin
      if (i=1) then
        continue;
      writeln(i);
    end;

    this will produce an output like
    Progress Report:
    0
    2

  4. #4
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here this may help

    Code:
    If InvCount = 28 then
        Continue;
    Still learning to code in Simba.

  5. #5
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by death12652 View Post
    Here this may help

    Code:
    If InvCount = 28 then
        Continue;
    If it's in a loop, that will skip to the end of the loop. Is that your question?

  6. #6
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  7. #7
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well I tried that but it doesn't exit the procedure it exits the script.
    Still learning to code in Simba.

  8. #8
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by death12652 View Post
    Well I tried that but it doesn't exit the procedure it exits the script.
    Be sure to use functions and procedures and not just do everything in your main loop, if that's what your doing.

  9. #9
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its not in the main loop lol its at the beginning of one of my procedures.
    Still learning to code in Simba.

  10. #10
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  11. #11
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well I would rather not release it until I'm finished but I can give you what you need to help me.

    Code:
    procedure HAHA;
    var
       A lot of Integer variables here;
    begin
      Z := InvCount;
      If Z = 28 then
        Exit;
      then a lot of other stuff
    end;
    
    begin
      other stuff
      repeat
        HAHA;
      until(InvFull = True);
      other stuff
    end.
    Still learning to code in Simba.

  12. #12
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Quote Originally Posted by death12652 View Post
    Well I would rather not release it until I'm finished but I can give you what you need to help me.

    Code:
    procedure HAHA;
    var
       A lot of Integer variables here;
    begin
      Z := InvCount;
      If Z = 28 then
        Exit;
      then a lot of other stuff
    end;
    
    begin
      other stuff
      repeat
        HAHA;
      until(InvFull = True);
      other stuff
    end.
    well tbh, that's repetitive. and another thing, that will only exit you out of haha. Also, you could just do
    Simba Code:
    if (InvCount = 28) then
      Exit;

  13. #13
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thats what I was trying to do and I swear on all your mothers graves (jk) that I did that and it terminated the script. Anyway I give up on my script as it just crashed and I lost all that I had.
    Still learning to code in Simba.

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
  •