AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [ANY] '#file' and what it does (https://forums.alliedmods.net/showthread.php?t=315375)

Timocop 04-10-2019 10:50

Re: [ANY] '#file' and what it does
 
W-why does everyone keep assuming my name!?
https://i.imgur.com/jfCMSoQ.png

Quote:

Originally Posted by 404UNF (Post 2646919)
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 (Post 2646919)
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 :P

https://i.imgur.com/hQQ88p7.gif
https://i.imgur.com/cWa3iI9.gif

404UserNotFound 04-10-2019 17:24

Re: [ANY] '#file' and what it does
 
Such is why I don't use SPEdit or BasicPawn (Sublime Text 3 for the win!). To each their own.

Thanks for the info on #line by the way, much appreciated. I'm always on the lookout for anything I've missed in my highlighting for ST3.


All times are GMT -4. The time now is 22:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.