Raised This Month: $ Target: $400
 0% 

Array crashing my server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 12-19-2011 , 10:26   Array crashing my server
Reply With Quote #1

My first time using arrays and the server is crashed when loading
Code:
#include < amxmodx > new Array:aArray; public plugin_cfg( ) {     aArray = ArrayCreate( 32 );     new iFile = fopen( "addons\maps.ini", "rt" );     new iEndFile = feof( iFile );     while( !iEndFile )     {         new szChar[ 256 ];         fgets( iFile, szChar, sizeof szChar - 1 );         ArrayPushString( aArray, szChar );     }     fclose( iFile ); } public plugin_init ( ) {     register_clcmd( "say 1", "msg" ); } public msg( ) {     new szLine[ 256 ];     ArrayGetString( aArray, 1, szLine, sizeof szLine - 1 );     client_print( 0, print_chat, "%s", szLine ); }
Dr7sTyLe 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 12:05.


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