Raised This Month: $ Target: $400
 0% 

confusing output from array


  
 
 
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 , 14:49   confusing output from array
Reply With Quote #1

i try to put server informations in a array.
but the output confuse me.

PHP Code:
new server_address[2];

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()
{
    
server_cmd("say IP: %s"server_address[0]);
    
server_cmd("say Port: %s"server_address[1]);
    return 
PLUGIN_CONTINUE;

the output is
Code:
 IP: l27015
 Port: 27015
the port is correct but not the ip what i do wrong? o.0
__________________
Shadow Of Death is offline
 



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:26.


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