Raised This Month: $ Target: $400
 0% 

Retrieving strings using fake natives.....[Solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 07-11-2010 , 14:45   Retrieving strings using fake natives.....[Solved]
Reply With Quote #1

I tried many ways of retrieving strings using dynamic natives but i failed this is the main plugin that i was using:
Code:
#include <amxmodx> #include <amxmisc> public plugin_natives() {     register_native("get_persons_name", "_get_persons_name", 1) } public _get_persons_name(plugin, paramsnum) {     // No parameters passed     if(!paramsnum)         return -1         new name[32]     get_user_name(get_param(1), name, 30)     set_string(2, name, get_param(3))     return 1 }

sub plugin looks like this
i use the native to retrieve a persons name [Its just for testing purposes]
Code:
#include <amxmodx> #include <amxmisc> #include < name > public plugin_init() {     // Plugin registeration     register_plugin("-New","1.0","@bdul!")         register_clcmd("say test", "hook") } public hook(id) {     new name[32]     get_persons_name(id, name, charsmax(name))         client_print( id, print_chat, "******* Your Name : %s", name) }

Include file looks like this:
PHP Code:
#if defined _name_included
  #endinput
#endif
#define _name_included

native get_persons_nameid, const string[], len 
The Problem:
When i type test for checking i get this stupid run-time error:
PHP Code:
L 07/11/2010 23:27:57Wrong style of dynamic native
L 07
/11/2010 23:27:57: [AMXXRun time error 10 (plugin "example.amxx") (native "get_param") - debug not enabled!
L 07/11/2010 23:27:57: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes).
L 07/11/2010 23:27:57Unhandled dynamic native error
L 07
/11/2010 23:27:57: [AMXXRun time error 10 (plugin "working.amxx") (native "get_persons_name") - debug not enabled!
L 07/11/2010 23:27:57: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes). 
I dont know why these errors are occuring and due to this the native is not performing what it is supposed to do
So if please some one can help me then it would be great

Thnx in advance....
__________________

My Plugins For ZP

Inactive due to College and Studies

Last edited by abdul-rehman; 07-12-2010 at 11:57.
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
 



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:04.


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