Raised This Month: $ Target: $400
 0% 

[Github] Adding .inc file from another repository


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-01-2018 , 08:25   Re: [Github] Adding .inc file from another repository
Reply With Quote #4

Quote:
Originally Posted by arne1288 View Post
I must admit that I haven't been playing around much with submodules, but didn't you mean:

Code:
git submodule add https://github.com/OciXCrom/cromchat scripting/include/cromchat
Otherwise I believe the path to the cromchat.inc file @ #include will be a little bit incorrect?

?
Then he'd have to do
PHP Code:
#include "include/cromchat/cromchat.inc" 
The path you set will be the base path for that submodule, i.e. the directory in which all of submodules contents will be copied. I didn't purposely set it to "scripting/include/cromchat" because, as you see, including it gets ridiculous.
Also confusion may arrive because that "/include" path is not automatically added to included paths, you have to do it yourself when compiling or just reference it using a relative path (like I did).
I mean it's up to the OP what he wants to do with it, I just posted what I would've done.
__________________
klippy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode