View Single Post
nosoop
Veteran Member
Join Date: Aug 2014
Old 10-17-2019 , 20:12   Re: [ANY]Native function
Reply With Quote #8

Quote:
Originally Posted by nosoop View Post
I'm glossing over a bit to keep things simple
I guess I was in over my head trying to get to the point that you can't just register a native in Squirrel and use it like you would any other function in SourceMod without various hoops that may or may not be written yet.

Quote:
Originally Posted by NiceT View Post
I don't understand the implementation of the PrintCenterText on GitHud you replied to. Sorry about that.
The function is implemented and registered with C++; that's why you couldn't find anything written in SourcePawn about the underlying implementation as you mentioned in the first post.

Quote:
Originally Posted by Silvers View Post
You can: [L4D2 / CSGO / ANY] Execute Vscript Get Return
You're using the game engine as a bridge for the functionality. Of course you'll require some sort of bridge in any case (the VScript Functions extension is another existing method), but it's far from direct interop between the two VMs.

Quote:
Originally Posted by dustinandband View Post
So would this be incorrect usage of the "native" keyword?
SourceMod exposes the ability to register plugin functions as natives (this isn't necessarily a feature provided by other applications that embed the SourcePawn VM, if any). The plugin that knows about the native (whatever includes l4d2stats.inc) has no idea what implements the native. All it knows is that it's not within its own plugin, and so SM has to handle it.

I believe the native specifier started from Pawn and predates the ability to register natives through other SourcePawn plugins. SourceMod's native registration means it's closer to an extern, though again, that's a very simplified way of putting it.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 10-17-2019 at 20:15.
nosoop is offline