Hi,
How can I return a string?
PHP Code:
public plugin_init()
{
register_cvar("amx_mode_prefix", "[Test]");
}
public plugin_natives()
{
register_native("get_server_prefix", "native_get_server_prefix", 1);
}
public native_get_server_prefix()
{
new iPrefix[64];
get_cvar_string("amx_mode_prefix", iPrefix, sizeof iPrefix - 1);
return iPrefix;
}
PHP Code:
client_print(id, print_chat, "%s test messages", get_server_prefix());
This does not work when trying to use the function earns error in console.
With what I saw, PAWN can not make a return string, only values?