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

[TUT] Dynamic / Fake Natives


Post New Thread Reply   
 
Thread Tools Display Modes
t3hNox
Senior Member
Join Date: Oct 2009
Old 06-29-2012 , 14:46   Re: [TUT] Dynamic / Fake Natives
Reply With Quote #31

Check "core program".
You use iParamID incorrectly. iParamID returns the total amount of parameters passed to the native. For example, for bkf_setFrags you should pass 3 parameters and thus in native handle you should check whether iParamID is 3 (to avoid possibility that too many or not enough parameters are provided) and get the first parameter by using get_param(1) (id), get_param(2) (level), get_param(3, szReason, charsmax(szReason)) (reason). I'm also not sure if you can specify "a default" value for reasons.
t3hNox is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-29-2012 , 16:29   Re: [TUT] Dynamic / Fake Natives
Reply With Quote #32

register_library("FragsBrass.inc")

->

register_library("FragsBrass")

You dont register a file, but a library name, it has to match the one you pass with #reqlib in .inc file.
Also, you'd better to check for params num and when param is a player index to check range so you can fire an error that gonna appear from the 3rd plugin instead of from your core plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-30-2012 , 11:04   Re: [TUT] Dynamic / Fake Natives
Reply With Quote #33

Thanks guys! All of your suggestions/corrections lead to a properly working API. i send love. <3
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Old 02-27-2014, 02:27
elantra86
This message has been deleted by YamiKaitou. Reason: duplicate
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 07:28.


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