dini won't check if file exist [+REP]
#1

hey all i have problem with dini
it won't check if the toptimes file is exist but it's already exist in the map folder

pawn Код:
if(!dini_Exists(CurrentMapMeta))
    {
        format(CurrentMapMeta,166,"EdmMaps/%s/toptimes.txt",MapSRC);
        printf("default toptimes has been set on %s", MapSRC);
        dini_Create(CurrentMapMeta);
        dini_IntSet(CurrentMapMeta, "Recorder_1", 0);
        dini_IntSet(CurrentMapMeta, "Recorder_2", 0);
        dini_IntSet(CurrentMapMeta, "Recorder_3", 0);
        dini_IntSet(CurrentMapMeta, "Recorder_4", 0);
        dini_IntSet(CurrentMapMeta, "Recorder_5", 0);
        dini_IntSet(CurrentMapMeta, "Recorder_6", 0);
        dini_IntSet(CurrentMapMeta, "Recorder_7", 0);
        dini_IntSet(CurrentMapMeta, "Recorder_8", 0);
        dini_IntSet(CurrentMapMeta, "Recorder_9", 0);
        dini_IntSet(CurrentMapMeta, "Recorder_10", 0);
        dini_Set(CurrentMapMeta, "Recorder_1_Name", "<N/A>");
        dini_Set(CurrentMapMeta, "Recorder_2_Name", "<N/A>");
        dini_Set(CurrentMapMeta, "Recorder_3_Name", "<N/A>");
        dini_Set(CurrentMapMeta, "Recorder_4_Name", "<N/A>");
        dini_Set(CurrentMapMeta, "Recorder_5_Name", "<N/A>");
        dini_Set(CurrentMapMeta, "Recorder_6_Name", "<N/A>");
        dini_Set(CurrentMapMeta, "Recorder_7_Name", "<N/A>");
        dini_Set(CurrentMapMeta, "Recorder_8_Name", "<N/A>");
        dini_Set(CurrentMapMeta, "Recorder_9_Name", "<N/A>");
        dini_Set(CurrentMapMeta, "Recorder_10_Name", "<N/A>");
    }
plz help and thnx

sorry for my very bad english
Reply
#2

PHP код:
if(dini_Exists(CurrentMapMeta))
    {
        
format(CurrentMapMeta,166,"EdmMaps/%s/toptimes.txt",MapSRC);
        
printf("default toptimes has been set on %s"MapSRC);
        
dini_Create(CurrentMapMeta);
        
dini_IntSet(CurrentMapMeta"Recorder_1"0);
        
dini_IntSet(CurrentMapMeta"Recorder_2"0);
        
dini_IntSet(CurrentMapMeta"Recorder_3"0);
        
dini_IntSet(CurrentMapMeta"Recorder_4"0);
        
dini_IntSet(CurrentMapMeta"Recorder_5"0);
        
dini_IntSet(CurrentMapMeta"Recorder_6"0);
        
dini_IntSet(CurrentMapMeta"Recorder_7"0);
        
dini_IntSet(CurrentMapMeta"Recorder_8"0);
        
dini_IntSet(CurrentMapMeta"Recorder_9"0);
        
dini_IntSet(CurrentMapMeta"Recorder_10"0);
        
dini_Set(CurrentMapMeta"Recorder_1_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_2_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_3_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_4_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_5_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_6_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_7_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_8_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_9_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_10_Name""<N/A>");
    } 
you used
PHP код:
if(!dini_Exists(CurrentMapMeta)) 
! = not exist
Reply
#3

Quote:
Originally Posted by jlalt
Посмотреть сообщение
PHP код:
if(dini_Exists(CurrentMapMeta))
    {
        
format(CurrentMapMeta,166,"EdmMaps/%s/toptimes.txt",MapSRC);
        
printf("default toptimes has been set on %s"MapSRC);
        
dini_Create(CurrentMapMeta);
        
dini_IntSet(CurrentMapMeta"Recorder_1"0);
        
dini_IntSet(CurrentMapMeta"Recorder_2"0);
        
dini_IntSet(CurrentMapMeta"Recorder_3"0);
        
dini_IntSet(CurrentMapMeta"Recorder_4"0);
        
dini_IntSet(CurrentMapMeta"Recorder_5"0);
        
dini_IntSet(CurrentMapMeta"Recorder_6"0);
        
dini_IntSet(CurrentMapMeta"Recorder_7"0);
        
dini_IntSet(CurrentMapMeta"Recorder_8"0);
        
dini_IntSet(CurrentMapMeta"Recorder_9"0);
        
dini_IntSet(CurrentMapMeta"Recorder_10"0);
        
dini_Set(CurrentMapMeta"Recorder_1_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_2_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_3_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_4_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_5_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_6_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_7_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_8_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_9_Name""<N/A>");
        
dini_Set(CurrentMapMeta"Recorder_10_Name""<N/A>");
    } 
you used
PHP код:
if(!dini_Exists(CurrentMapMeta)) 
! = not exist
you didn't understand me man
i need to check if map doesn't has a toptimes file it will create it
but if the file is already exist return 1;
but the problem is even if the map don't have the toptimes files it return 1 without creating the file

sorry for my bad english
Reply
#4

upppp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)