Raised This Month: $ Target: $400
 0% 

Formatex Dimensional Array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Strick3n
Member
Join Date: Apr 2013
Old 05-03-2013 , 06:54   Formatex Dimensional Array
Reply With Quote #1

Hello, i'm trying to print "Hello world!" to server console but it prints "Hello Hello"

here my code:
Code:
#include < amxmodx >

enum _:m_String
{
	szHello[32],
	szWorld[32]
}

new g_szString[ ][ m_String ];

public plugin_init() 
{
	set_task( 5.0, "loadWorld" );
}

public loadWorld( )
{
	formatex( g_szString[ 0 ][ szHello ], charsmax( g_szString[ ][ szHello ] ), "Hello" );
	
	formatex( g_szString[ 0 ][ szWorld ], charsmax( g_szString[ ][ szWorld ] ), "World" );
	
	new szString[ 128 ];
	
	formatex( szString, charsmax( szString ), "%s %s!", g_szString[ 0 ][ szHello ], g_szString[ 0 ][ szWorld ] );

	server_print( szString );
}
anyone know what's wrong here?
Strick3n 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 10:50.


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