Backslash inside #include - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Backslash inside #include (
/showthread.php?tid=650735)
Backslash inside #include -
GaByM - 05.03.2018
Should I switch from including files with '/' to '\' ?
I'm asking because I already did it, and now I see that I have a lot of 'main.inc' files:
PHP код:
#include "core\admin\main"
#include "core\building\main"
#include "core\item\main"
#include "core\player\main"
#include "core\squad\main"
#include "core\vehicle\main"
#include "core\jobs\main"
#include "core\faction\main"
//etc..
I could change every file's name, but I got used to create a main file for every system and now I think that in future updates I will forget about this problem and main won't be included (since using '\' will not allow multiple files included with the same name) and then wonder why things don't work.
Give me reasons to get me into this style, despite the problems mentioned above.
Re: Backslash inside #include -
Hunud - 05.03.2018
Just use 'Replace' method. Sorry If i misunderstand the problem you have.
Re: Backslash inside #include -
[WSF]ThA_Devil - 05.03.2018
Go with whatever works, if using / fixes the issue and works as you want it to, do it.
Re: Backslash inside #include -
AroseKhanNiazi - 05.03.2018
Try this on top of these includes.
Re: Backslash inside #include -
GaByM - 06.03.2018
Thank you for your suggestions, but I would like to know if there are other advantages in using '\' (except it doesn't let me include multiple files with the same name).
Re: Backslash inside #include -
Sew_Sumi - 06.03.2018
Quote:
Originally Posted by AroseKhanNiazi
Try this on top of these includes.
|
If you'd explain why maybe it'd have some weight...
Re: Backslash inside #include -
AroseKhanNiazi - 06.03.2018
Oh my bad, I thought he needs something which allows him to include multiple includes of the same name.