Raised This Month: $ Target: $400
 0% 

Check if the first line in file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-11-2009 , 11:11   Re: Check if the first line in file
Reply With Quote #5

PHP Code:
new spawnscredit 0line 0
 
while (file && !feof(file))
{
    
fgets(filebuffercharsmax(buffer))
    
trim(buffer)
    
line++
 
    if(
line == && (buffer[0] == '/' && buffer[1] == '/')) //
    
{
        
spawnscredit 1
 
        set_task
(10.0"print_spawnscredit"_buffercharsmax(buffer))
    }
 
    
// ..
 


or...

PHP Code:
new bool:spawnscredit false
 
while (file && !feof(file))
{
    
fgets(filebuffercharsmax(buffer))
    
trim(buffer)
 
    if(!
spawnscredit && (buffer[0] == '/' && buffer[1] == '/')) //
        
set_task(10.0"print_spawnscredit"_buffercharsmax(buffer))
 
    
spawnscredit true
 
    
// ..

in wich I guess "spawnscredit" is for that check... if not use above or use this one with different name
__________________
Hunter-Digital 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 01:34.


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