Closed MAGNAT2645 closed 6 years ago
It does, you just have to include them in your source. The Object Browser only shows what you have included (recursively through includes). sourcemod.inc is always included by default like the compiler does.
If you want to know all available includes just write #include
and it will show all includes BasicPawn has found.
I thought that includes will be stored globally and user will see all content inside include folder. Also tooltip doesn't work for separated code parts like #include 2nd_part_of_code.sp. I mean that my includes are visible only inside main SP that i will compile, but other parts can't see all #include from this file.
EDIT: I'm used to how it works in SPEdit, but I decided to try BasicPawn because of the strange functionality of auto-formatting feature in SPEdit. This feature works better in BasicPawn.
Also would be good if there was hotkeys like Ctrl+R for Format Code > Reindent Code (and without need to select where to do it).
EDIT: I've added #include tf2_stocks and updated Autocomplete but tooltip doesn't work for TF2GetClientTeam and other TF2* natives (and doesn't appear in Objet Browser)
EDIT 2: I found that BasicPawn can see include files only if it's names have been surrounded with <> brackets. But for compiler it doesn't matter.
Yea you have to put <> (include) or "" (relative path) around the filename/path in order for it to work correctly, nice catch. Ill fix that.
Could you open another issue for the Format Code request since its off-topic.
Also, if youre working with includes, always keep the main source open. So BasicPawn knows which files are references where. Example:
Yeah, now it works. Would be good if there was support for #include preprocessor without <> and "". I will open new issue with other bug (as i think) and Format Code request.
EDIT: Should i open request separately from bug or i can post bug+request in 1 issue?
Already on my todo list. Just make a new issue for your Format Code request. This issue will be related to the #include issue so i can close this when the issue is fixed.
Fixed. Thank you for reporting it :)
Why BasicPawn doesn't include non-core includes like tf2.inc, tf2_stocks.inc, sdktools.inc, sdkhooks.inc and etc.?
I've set config to Manual and put include directory but tooltip doesn't popup for non-core SM natives. Also all non-core includes doesn't displaying in Object Browser.