Raised This Month: $ Target: $400
 0% 

Run time error 3 - Stack Error - is there a pragma I need?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 05-05-2006 , 14:05  
Reply With Quote #9

Code:
public WC3_EnableModule( module_name[] ) {     // you should make them static or global     new const szModulesINI[] = "addons/amxmodx/configs/modules.ini";     new const szTempINI[] = "addons/amxmodx/configs/modules_temp.ini";     static szLine[256];     //******************************************************************************     new rFile = fopen( szModulesINI, "r" );     if( !rFile )         return 0;             new wFile = fopen( szTempINI, "w" );     if( !wFile )         return 0;         //******************************************************************************     new pos;     while( !feof( rFile ) )     {         fgets( rFile, szLine, 255 );         pos = 0;         if( containi( szLine, module_name ) != -1 && szLine[0] == ';')             pos = 1;             fputs( wFile, szLine[pos] );     }     //******************************************************************************     fclose( rFile );     fclose( wFile );         delete_file( szModulesINI );         return rename_file( szTempINI, szModulesINI )}

compiled fine with 0 errors and 0 warnings.
not tested, but should work

edit:
i had an mistake in the code *fixed*
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
 



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 05:00.


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