Try to replace...
I try to replace . with _ in a string.
But i dont know what i do wrong.
Hope any can help me with this. I use the stock from Exolent http://forums.alliedmods.net/showthread.php?t=163205.
it dosnt replace the dots.
But i dont know what i do wrong.
Hope any can help me with this. I use the stock from Exolent http://forums.alliedmods.net/showthread.php?t=163205.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <string_stocks>
.
.
.
new server_address[2][33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /test","test")
get_cvar_string("ip", server_address[0], 32);
get_cvar_string("port", server_address[1], 32);
}
public test()
{
str_replace(server_address[0], 32, ".", "_", 0, 1);
server_cmd("say IP: %s", server_address[0]);
server_cmd("say Port: %s", server_address[1]);
return PLUGIN_CONTINUE;
}
Orignal From: Try to replace...
Post a Comment