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.




PHP Code:







#include <amxmodx>

#include <amxmisc>

#include <string_stocks>

.

.

.

new 
server_address[2][33];



public 
plugin_init() {

    
register_plugin(PLUGINVERSIONAUTHOR);

    
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".""_"01);

    

    
server_cmd("say IP: %s"server_address[0]);

    
server_cmd("say Port: %s"server_address[1]);

    return 
PLUGIN_CONTINUE;











it dosnt replace the dots.


Orignal From: Try to replace...

No comments

Not a single link is allowed to submit in comment :o