Results 1 to 6 of 6

Thread: Question regarding includes

  1. #1
    Join Date
    Apr 2007
    Posts
    373
    Mentioned
    2 Post(s)
    Quoted
    24 Post(s)

    Default Question regarding includes

    If i make my own includes.
    Should i add them to the simba include folder?
    This kinda defeats the purpose of making complicated scripts easier to remember, keep the overview.

    Can i add a folder named "core" in the same folder as the script is saved.
    And save my includes there?

    then link all the includes by making a include.Simba in that core folder.

    and just adding this to my main script.
    Simba Code:
    {$i core/includes.simba}


    Thx for your time.
    ~Fre

  2. #2
    Join Date
    Aug 2013
    Posts
    230
    Mentioned
    1 Post(s)
    Quoted
    114 Post(s)

    Default

    Quote Originally Posted by fre View Post
    Can i add a folder named "core" in the same folder as the script is saved.
    And save my includes there?
    then link all the includes by making a include.Simba in that core folder.
    and just adding this to my main script.
    Simba Code:
    {$i core/includes.simba}



    Thx for your time.
    yes you can. I use it all the time.

  3. #3
    Join Date
    Apr 2007
    Posts
    373
    Mentioned
    2 Post(s)
    Quoted
    24 Post(s)

    Default

    Because i do so, and i still get unkown declaration from a procedure i have in an include

    Oh wow, it does matter in what order you include the includes?
    Last edited by fre; 10-09-2016 at 07:42 PM.
    ~Fre

  4. #4
    Join Date
    Oct 2012
    Posts
    1,258
    Mentioned
    40 Post(s)
    Quoted
    588 Post(s)

    Default

    Quote Originally Posted by fre View Post
    Oh wow, it does matter in what order you include the includes?
    Yes. Are you doing rs3, osrs, or something else?
    Either way, I'd recommend calling your own include after all the other includes you're using.
    e: I see section now

  5. #5
    Join Date
    Dec 2013
    Location
    Pitcairn Island
    Posts
    288
    Mentioned
    20 Post(s)
    Quoted
    166 Post(s)

    Default

    Quote Originally Posted by fre View Post
    If i make my own includes.
    Should i add them to the simba include folder?
    This kinda defeats the purpose of making complicated scripts easier to remember, keep the overview.

    Can i add a folder named "core" in the same folder as the script is saved.
    And save my includes there?

    then link all the includes by making a include.Simba in that core folder.

    and just adding this to my main script.
    Simba Code:
    {$i core/includes.simba}


    Thx for your time.
    No, Simba had a default includes directory (Includes folder in install directory), but you can change this in the settings.

  6. #6
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    iirc if you want to include from the current directory, you could do {$i ./file.simba} or {$i ./subdir/file.simba} for example
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

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
  •