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", szCfgDir, charsmax(szCfgDir));
// ?????? ? ????? ??????
formatex(szCfgFile, charsmax(szCfgFile), "%s/HitAndRun/rs_list.ini", szCfgDir);
switch(file_exists(szCfgFile))
{
case 0: set_fail_state("File ^"%s^" not found!", szCfgFile);
case 1:
{
new szBuffer[64], iLine, iLen;
g_aDataRoundSound = ArrayCreate(256);
while(read_file(szCfgFile, iLine++, szBuffer, charsmax(szBuffer), iLen))
{
if(!iLen || szBuffer[0] == ';')
continue;
if(!file_exists(szBuffer)) {
log_amx("%s not exists", szBuffer);
continue;
}
engfunc(EngFunc_PrecacheGeneric, szBuffer);
ArrayPushArray(g_aDataRoundSound, szBuffer);
}
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"
|