[Tutorial] Creating an include
#7

Quote:
Originally Posted by Misiur
View Post
It's funny how you linked Y_Less's thread, but explained something completely diffrent.
http://forum.sa-mp.com/showthread.ph...593#post819593
1. Include guards are already built-in
2. #include <a/b> should be #include <a\b>
3. In case you have #include <b> and #include <a\b> you might have to get rid of default include guards and substiture them with your implementation
4. #pragma dynamic doesn't change cell size. Cell is always 4 bytes on 32 bit builds
That thread was linked for some basic facts which can be used while creating an include and I don't see anything wrong with it.
About include-guards : If we're including the same file twice, it's true that there won't be any errors/warns. However, it's required in case if other versions of that include is being done and we're naming it anything else. Some releases are there which mostly uses the same part of code but just the include name is renamed.

About the second one, I was also confused for a while in choosing what should be. I've done some tests and it seems like both character usage works fine. If there's something wrong with it, please let me know. An example would be fine.

Third one - I did some test right now, but it seems like things are alright but got chances to have collision as you've told. In such case, I believe it's better for the user to rename the file.

Fourth - Yes, it doesn't change the cell size. It just allows you to get your script compiled with arrays of larger cells. It won't be giving any stack size warning or message in case if higher cells are used under a callback and compiled. I've given this reply on the tutorial also, now.
Reply


Messages In This Thread
Creating an include - by Lordzy - 25.02.2014, 05:19
Re: Creating an include - by Lordzy - 25.02.2014, 05:21
Re: Creating an include - by Avi Raj - 25.02.2014, 05:22
Re: Creating an include - by LeGGGeNNdA - 25.02.2014, 13:30
Re: Creating an include - by Clad - 25.02.2014, 13:34
Re: Creating an include - by Misiur - 25.02.2014, 13:39
Re: Creating an include - by Lordzy - 25.02.2014, 13:54
Re: Creating an include - by Misiur - 25.02.2014, 14:10
Re: Creating an include - by Vince - 25.02.2014, 14:14
Re: Creating an include - by Lordzy - 25.02.2014, 14:16
Re: Creating an include - by KennyP - 25.02.2014, 14:24
Re: Creating an include - by ColeMiner - 25.02.2014, 15:07
Re: Creating an include - by Ozil - 25.02.2014, 21:28
Re: Creating an include - by Lordzy - 26.02.2014, 00:48
Re: Creating an include - by OnPlayerText - 26.02.2014, 05:43
Re: Creating an include - by Sagna - 27.02.2014, 23:38
Respuesta: Creating an include - by Swedky - 11.03.2014, 04:01

Forum Jump:


Users browsing this thread: 1 Guest(s)