Raised This Month: $ Target: $400
 0% 

Try to replace...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Shadow Of Death
Senior Member
Join Date: Jun 2005
Old 11-12-2011 , 22:01   Try to replace...
Reply With Quote #1

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.
__________________
Shadow Of Death is offline
 


Thread Tools
Display Modes

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 08:27.


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