View Single Post
Timocop
AlliedModders Donor
Join Date: Mar 2013
Location: Germany
Old 04-10-2019 , 10:50   Re: [ANY] '#file' and what it does
Reply With Quote #11

W-why does everyone keep assuming my name!?


Quote:
Originally Posted by 404UNF View Post
Is there really a #line?
Yep. Im too lazy to search where #line is actualy located in the SourcePawn github files.
But you can find all compiler (Small/Pawn/SourcePawn) keywords on my BasicPawn github: https://github.com/Timocop/BasicPawn...dater.vb#L5078

Quote:
Originally Posted by 404UNF View Post
all it does is change what's shown in compile.exe
And in the error stack trace. Depends where you put it.

Code:
] sm plugins refresh
L 04/10/2019 - 16:08:49: [SM] Exception reported: Lmao notin here
L 04/10/2019 - 16:08:49: [SM] Blaming: ee0fc772-2f79-4c6c-b0ae-b13bbc971c57.smx
L 04/10/2019 - 16:08:49: [SM] Call stack trace:
L 04/10/2019 - 16:08:49: [SM]   [0] ThrowError
L 04/10/2019 - 16:08:49: [SM]   [1] Line 18, Externets epic plugin!::OnPluginStart
L 04/10/2019 - 16:08:49: [SM] Unable to load plugin "ee0fc772-2f79-4c6c-b0ae-b13bbc971c57.smx": Error detected in plugin startup (see error logs)
[SM] The plugin list has been refreshed and reloaded.
PHP Code:

#define DEBUG

#define PLUGIN_NAME           "My plugin"
#define PLUGIN_AUTHOR         ""
#define PLUGIN_DESCRIPTION    ""
#define PLUGIN_VERSION        "1.0"
#define PLUGIN_URL            ""

#file "Externets epic plugin!"

#include <sourcemod>
#include <sdktools>

#pragma semicolon 1

public Plugin myinfo =
{
    
name PLUGIN_NAME,
    
author PLUGIN_AUTHOR,
    
description PLUGIN_DESCRIPTION,
    
version PLUGIN_VERSION,
    
url PLUGIN_URL
};

public 
void OnPluginStart()
{
    
ThrowError("Lmao notin here");

Using #file/#line will definilty break BasicPawn's/SPEdit's (And probably other editors) error highlighting. So i doubt it will make you life easier using it with all those risks just for having a nice name in the compiler window


__________________

Last edited by Timocop; 04-10-2019 at 10:55.
Timocop is offline