Raised This Month: $ Target: $400
 0% 

.inc file function requirements


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-29-2012 , 00:34   .inc file function requirements
Reply With Quote #1

is there a way to require that a plugin using an inc file must use a set of specified functions. Much like what java does with its [w/e its called...i can't remember off the top of my head] for inheritance. I think C++ might do that too.....

I have a plugin extension that should require the use of two functions, and i'd like to be able to do that. Is there a way? Or is that not in pawn's style....
Sorry if this is in the wrong section.
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 06-29-2012 at 00:34.
Liverwiz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-29-2012 , 01:55   Re: .inc file function requirements
Reply With Quote #2

You mean that if a function inside a .inc file is not used then it shouldn't work?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-29-2012 , 01:59   Re: .inc file function requirements
Reply With Quote #3

yes.
I'm writing an API and there are a few functions required for the core that would make the extension useless without it. So might as well just require them....ya know?
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-29-2012 , 02:09   Re: .inc file function requirements
Reply With Quote #4

Can you give an example?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-29-2012 , 02:16   Re: .inc file function requirements
Reply With Quote #5

Let me try......

I have a core program, that includes its own API. This core has functionality of setPowers(id) and disablePowers(id). Now...these two functions are called every time they need to within the core, and include a forward within them, to enable, and disable the correlating powers. And if another plugin wants to work alongside this core, using its API, it would be pretty useless for it to not have these two functions defined, for that is the entire purpose of the API, easily set customizable powers, and in turn, disable them. Is there a way to require the extension declare these functions, and if not...it doesn't compile correctly or something?
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-29-2012 , 02:46   Re: .inc file function requirements
Reply With Quote #6

If the plugin includes the API and doesn't use it, well then the API is useless to the plugin and probably won't work as expected.
Just don't worry about requirements since there shouldn't be a situation where there are functions missing.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-29-2012 , 02:56   Re: .inc file function requirements
Reply With Quote #7

I figured as much....thanks for confirming.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz 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 15:23.


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