Raised This Month: $51 Target: $400
 12% 

Getting a funtion name by function ID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fakuivan
Senior Member
Join Date: Nov 2015
Old 11-28-2015 , 17:18   Getting a funtion name by function ID
Reply With Quote #1

Is that possible? how can I do that?


Code:
PrintToServer("[TFtDB]Error while calling a TFtDBQTRow function, Funcion name: %s, on plugin: %s", funcname, pluginfilename);
fakuivan is offline
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 11-28-2015 , 17:29   Re: Getting a funtion name by function ID
Reply With Quote #2

https://sm.alliedmods.net/new-api/fu...FunctionByName
__________________
Starbish is offline
fakuivan
Senior Member
Join Date: Nov 2015
Old 11-28-2015 , 17:31   Re: Getting a funtion name by function ID
Reply With Quote #3

The title: "Getting a funtion name by function ID"

The wiki: "Gets a function id from a function name"

Quote:
Originally Posted by Starbish View Post
fakuivan is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 11-28-2015 , 17:32   Re: Getting a funtion name by function ID
Reply With Quote #4

Quote:
Originally Posted by Starbish View Post
That is not what he means, he's asking how to get the function's debug name from it's ID.

Answer: It depends on if SourcePawn exposes it to SM(I checked, but unless I missed it, I couldn't find any).
WildCard65 is offline
fakuivan
Senior Member
Join Date: Nov 2015
Old 11-28-2015 , 18:23   Re: Getting a funtion name by function ID
Reply With Quote #5

It seems like you can't
fakuivan is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-28-2015 , 18:25   Re: Getting a funtion name by function ID
Reply With Quote #6

You should use ThrowNativeError if it is applicable for what you're doing - else you'll need the new BlamePluginError function exposed to SP.
__________________
asherkin is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 11-28-2015 , 20:41   Re: Getting a funtion name by function ID
Reply With Quote #7

Quote:
Originally Posted by asherkin View Post
You should use ThrowNativeError if it is applicable for what you're doing - else you'll need the new BlamePluginError function exposed to SP.
Your talking about this change yes? https://github.com/alliedmodders/sourcemod/pull/448
WildCard65 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:06.


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