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

Solved file read not exists


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 02-02-2020 , 11:23   file read not exists
Reply With Quote #1

LOGS:
Code:
L 02/02/2020 - 16:09:09: [HNR_Core.amxx] "sound/HNR/wins.mp3" not exists
Yesterday I had no problem reading data and today yes, I think maybe it is character size?
PHP Code:
public load_files() {
    new 
szCfgDir[64], szCfgFile[164];
    
get_localinfo("amxx_configsdir"szCfgDircharsmax(szCfgDir));
    
    
// ?????? ? ????? ??????
    
formatex(szCfgFilecharsmax(szCfgFile), "%s/HitAndRun/rs_list.ini"szCfgDir);
    switch(
file_exists(szCfgFile))
    {
        case 
0set_fail_state("File ^"%s^" not found!"szCfgFile);
        case 
1:
        {
            new 
szBuffer[64], iLineiLen;
            
g_aDataRoundSound ArrayCreate(256);
            while(
read_file(szCfgFileiLine++, szBuffercharsmax(szBuffer), iLen))
            {
                if(!
iLen || szBuffer[0] == ';'
                    continue;
                
                if(!
file_exists(szBuffer)) {
                    
log_amx("%s not exists"szBuffer);
                    continue;
                }
                
                
engfunc(EngFunc_PrecacheGenericszBuffer);
                
ArrayPushArray(g_aDataRoundSoundszBuffer);
            }
            
g_iRoundSoundSize ArraySize(g_aDataRoundSound);
        }
    }


rs_list.ini

Quote:
; Syntax
; "file"
;
; Example
; "sound/HNR/winsound1.mp3"

"sound/HNR/wins.mp3"
"sound/HNR/wins1.mp3"
"sound/HNR/wins2.mp3"
"sound/HNR/wins3.mp3"
"sound/HNR/wins4.mp3"

Last edited by Fuck For Fun; 02-02-2020 at 12:35.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-02-2020 , 11:33   Re: file read not exists
Reply With Quote #2

Try removing the quotes around the file?
__________________
Bugsy is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 02-02-2020 , 12:22   Re: file read not exists
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
Try removing the quotes around the file?
still no, May be file not exists in directory?
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-02-2020 , 12:23   Re: file read not exists
Reply With Quote #4

Quote:
Originally Posted by Fuck For Fun View Post
still no, May be file not exists in directory?
Lol, duh.
__________________
Bugsy is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 02-02-2020 , 12:26   Re: file read not exists
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
Lol, duh.
Yeah pretty funny to say that, but i FIXES Like you said above I had to remove the quote

Last edited by Fuck For Fun; 02-02-2020 at 12:34.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Reply



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 15:37.


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