I need help really fast
#1

I am trying to make dynamic billboard system but i have this problem. When i create billboard it won't save it.
Here is what i got
PHP код:
#define BILBORD_FILE        "Bilbordi/%d.ini"
    
for(new 0sizeof(BilbordInfo); i++)
    {
        new 
baFile[50];
        
format(baFilesizeof(baFile), BILBORD_FILEi);
        if(
fexist(baFile))
        {
             
INI_ParseFile(baFile"UcitajBilbord", .bExtra true, .extra i);
            
KreirajBilbord(i);
        }
    }
public 
OnGameModeExit()
{
    for(new 
ba 0ba sizeof(BilbordInfo); ba++) { SacuvajBilbord(ba); }
    return 
1;
}
forward UcitajBilbord(bilbordid,  name[], value[]);
public 
UcitajBilbord(bilbordidname[], value[])
{
    
INI_Int("Postavljen",BilbordInfo[bilbordid][bPostavljen]);
    
INI_Float("X",BilbordInfo[bilbordid][bX]);
    
INI_Float("Y",BilbordInfo[bilbordid][bY]);
    
INI_Float("Z",BilbordInfo[bilbordid][bZ]);
    
INI_Float("Angle",BilbordInfo[bilbordid][bAngle]);
    
INI_Int("Int",BilbordInfo[bilbordid][bInt]);
    
INI_Int("VW",BilbordInfo[bilbordid][bVW]);
    return 
1;
}
stock SacuvajBilbord(bilbordid)
{
    new 
kFile[80];
    
format(kFilesizeof(kFile), BILBORD_FILEbilbordid);
    new 
INI:File INI_Open(kFile);
    
INI_WriteInt(File,"Postavljen",BilbordInfo[bilbordid][bPostavljen]);
    
INI_WriteFloat(File,"X",BilbordInfo[bilbordid][bX]);
    
INI_WriteFloat(File,"Y",BilbordInfo[bilbordid][bY]);
    
INI_WriteFloat(File,"Z",BilbordInfo[bilbordid][bZ]);
    
INI_WriteFloat(File,"Angle",BilbordInfo[bilbordid][bAngle]);
    
INI_WriteInt(File,"Int",BilbordInfo[bilbordid][bInt]);
    
INI_WriteInt(File,"VW",BilbordInfo[bilbordid][bVW]);
    
INI_Close(File);
    return 
1;

What to do?? It won't create folder in Scriptfiles
Reply
#2

I think you have to create the folder by yourself, the system will create the file then (I could be wrong)
Reply
#3

Nope. Still won't create files
Reply


Forum Jump:


Users browsing this thread: