Results 1 to 7 of 7

Thread: inbuilt simba/scar Types

  1. #1
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default inbuilt simba/scar Types

    In script repository there is a lot of functions with inbuilt types as arguments. Types like TBox ,TIntegerArray ,T2DPointArray ,TInvenItemArr and other strange names. I can't find anything about them on http://docs.wizzup.org/ ,so only way to learn how to use them is analysing other scripts ,but it's a bit pain for me.

    Where can I read description of these types?


    Secondly I have problem with definiting TBox. I Found on http://wiki.scar-divi.com/titan/inde...tle=Types.TBox example ,but it seems to not work in Simba.
    SCAR Code:
    var
      b: TBox;
       
    begin
      b := Box(5, 6, 7, 8);

    end.

    I'm getting error
    Code:
    [Error] (26:12): Unknown identifier 'Box' at line 25
    I know I can define every field separately like:
    SCAR Code:
    var
      b: TBox;
       
    begin
      b.x1 := 5;
      b.y1 := 6;
      b.x2 := 7;
      b.y2 := 8;
    end.

    ,but is there any faster one-line way?

  2. #2
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    make a function that does it, then call that function.

  3. #3
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Most tutorials in the tutorial section hold information on all of these types. Some of them you also learn by experience.

    Coh3n has most of these covered: http://villavu.com/forum/showthread.php?t=49089

  4. #4
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Quote Originally Posted by KingKong View Post
    make a function that does it, then call that function.
    Yes ,but i thought Simba has equivalent of that Scar "box" function.


    Ok I just found what i needed here:
    https://github.com/MerlijnWajer/Simb...ufasatypes.pas

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

    Default

    We do. It's called IntToBox();


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

    Default

    EDIT: 'd by NCDS

    You want to use "IntToBox();", like so:

    Simba Code:
    program new;

    var
      b : TBox;

    begin
      b := IntToBox(5, 6, 7, 8);

      with b do
      begin
        x1 := 5;
        y1 := 6;
        x2 := 7;
        y2 := 8;
      end;
    end.
    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.


  7. #7
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    In scar you can do Box(....) but with Simba you must do IntToBox(....)


    ~Home

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
  •