Raised This Month: $ Target: $400
 0% 

Breaking socket data on lines?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
AoD90
Senior Member
Join Date: Jul 2008
Location: Ugljevik/RS/BIH
Old 04-26-2011 , 10:19   Re: Breaking socket data on lines?
Reply With Quote #2

nvm

I just used:

Code:
new ExplodedStrings[10][16]
        
        new Count = ExplodeString( ExplodedStrings, 10, 16, g_Data, '^n' )
        
        for(new i=0; i<=Count; i++)
        {
            log_amx("%s", ExplodedStrings[i])
        }
with
Code:
stock ExplodeString( p_szOutput[][], p_nMax, p_nSize, p_szInput[], p_szDelimiter ) 
{

     new nIdx = 0, l = strlen(p_szInput)
     new nLen = (1 + copyc( p_szOutput[nIdx], p_nSize, p_szInput, p_szDelimiter ))
     while( (nLen < l) && (++nIdx < p_nMax) )
    nLen += (1 + copyc( p_szOutput[nIdx], p_nSize, p_szInput[nLen], p_szDelimiter ))
     return nIdx
}
AoD90 is offline
Send a message via MSN to AoD90
 



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 04:18.


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