View Single Post
Author Message
404UserNotFound
BANNED
Join Date: Dec 2011
Old 04-04-2019 , 16:47   [ANY] '#file' and what it does
Reply With Quote #1

I just discovered this for the first time in use in a plugin by JugadorXEI, where he had the following bit of code under his #pragma lines:
#file "Rebalanced Fortress 2"

Initially I was confused as to what #file did, until I tried compiling the plugin.

Normally, without the use of #file "nameofplugin", the compile.exe window will print out something similar to the following for errors/warnings:
C:\Coding\scripting\exampleplugin.sp(1) : warning 219: etcetera.

With the addition of #file "nameofplugin" to your plugin, compiling it with compile.exe will show the following for errors/warnings instead:
nameofplugin(1): warning 219: etcetera

Here's an image showing the difference in output:


I don't know if #file does anything else aside from this. Please, do tell if it does. As well, in regards to directives that I don't know the functionality of, there's also #assert, #emit and #error. Don't know what they do.

Last edited by 404UserNotFound; 04-05-2019 at 15:12. Reason: The syntax highlighting colors I use are from my personal ST3 Syntax Highlighting
404UserNotFound is offline