send string to native
Hi,
can anyone explain what I'm doing wrong or maybe can give short script for noob how need to do this. i have main plugin with natives and sub-plugin with command /test For now I want to debug what's really works and try to print everything what I send to native, but don't work. Main plugin: Code:
public plugin_natives() {Code:
native up_get_info(id,key[])Code:
#include <amxmodx>Code:
test: < |
Re: send string to native
if I'm right, To set a string into the param 2 "key", format then after use set_string()
|
Re: send string to native
Code:
formatex(txt,254,"Key: %s ID: %s",key,id);You didn't format correctly. Also, I don't think you can return strings through natives. (I may be wrong. Let me go check.) |
Re: send string to native
At this poin is working:
main plugin: Code:
public native_get_info(iPlugin,iParam) { Code:
#include <amxmodx>I tryed: Code:
public native_get_info(iPlugin,iParam) { |
Re: send string to native
You are using set_string() wrong.
The first argument is the argument of the native. You are using "1", which is the "id". |
Re: send string to native
Also make.
get_somethingstring( id, buffer[], len); Also if you want to return Strings, you can search for a module that I make "StringX". Just return the pointer to the structure. |
| All times are GMT -4. The time now is 03:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.