Raised This Month: $12 Target: $400
 3% 

Is this a StrCat bug? (solved)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
step
Senior Member
Join Date: May 2010
Old 07-16-2010 , 23:23   Re: Is this a StrCat bug?
Reply With Quote #10

Ok, now it's fixed :)
Thanks a lot for the tips!

PHP Code:
CreateFilePath(String:buffer[], maxlength)
{
    static 
String:game[32];
    static 
String:version[32];
    
decl String:date[32];
    
decl String:temp[128];
    
    
// game name
    
if (strlen(game) == 0)
    {
        
GetGameFolderName(gamesizeof(game));
    }
    
    
// game version
    
if (strlen(version) == 0)
    {
        new 
Handle:file OpenFile("steam.inf""r");
        
ReadFileLine(filetempsizeof(temp));
        
CloseHandle(file);
        
TrimString(temp);
        new 
int;
        
int FindCharInString(temp'='false);
        
StrCat(versionsizeof(version), temp[int]);
        
ReplaceString(versionsizeof(version), "=""v");
        
ReplaceString(versionsizeof(version), ".""");
    }
    
    
// date & time
    
FormatTime(datesizeof(date), NULL_STRING);
    
ReplaceString(datesizeof(date), "/""_");
    
ReplaceString(datesizeof(date), " - ""_");
    
ReplaceString(datesizeof(date), ":""_");
    
ReplaceString(datesizeof(date), " ""_");
    
    
// path
    
BuildPath(Path_SMtempsizeof(temp), "logs\\%s_%s_%s.txt"gameversiondate);
    
    
// return
    
strcopy(buffermaxlengthtemp);


Last edited by step; 07-16-2010 at 23:28.
step 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 21:11.


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