Is ti possible to include .sp files?
Hello!
First I've searched for that quite a lot and don't seem to have found any answer not in the sourcepawn/sourcemod doc nor on this forum. So if the answer is somewhere out there I'm sorry just please point me to the right direction. Thank a lot. Cominf fom other language I've taken some habit. For more easy reading and maintainance of my code I want to include various .sp in my main plugin file. Is that possible and how? I tried to do: PHP Code:
Thank you again for your help. |
Re: Is ti possible to include .sp files?
I think the file should go into scripting rather than scripting/include when including an .sp file but I am not sure in general as I prefer a large plugin.
|
Re: Is ti possible to include .sp files?
try #include "myplugin_folder/myplugin_func.sp"
instead of #include <myplugin_folder/myplugin_func.sp> |
Re: Is ti possible to include .sp files?
Quote:
I like to break large plugins into multiple files based on a separation of concerns. While it's not exactly well maintained anymore, the NativeVotes plugin is split into 3 files:
The data storage stuff was originally separate so that I could change out the implementation in a way that would be transparent to plugins that use the NativeVote API. The third file probably should have been split into multiple different plugins instead and if I ever rewrite said plugin it probably will be, which would also allow it to support non-Valve games too. |
Re: Is ti possible to include .sp files?
Quote:
|
Re: Is ti possible to include .sp files?
Thank you every one that is what I was searching for. For the sake of any one searching this in the future here is a short resume of this:
PHP Code:
PHP Code:
PHP Code:
|
Re: Is ti possible to include .sp files?
includes inside of angle brackets (<this>) should be used for compiler specific inclusion or something like that, this is a c and c++ thing
anything else like externals, go enclosed in quotations like "this.sp" although im fairly sure it will also include .inc files if you do like #include <includefile> |
All times are GMT -4. The time now is 15:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.