Load problem
#1

this wont load when i start the server

PHP код:
stock LoadGates()
{
    for(new 
0SCRIPT_MAXGATESg++)
    {
        new 
fsave[40], string[128];
        
format(fsave50"gates/%d.ini"g);
        if(
DOF2_GetInt(stringfsave) != 0)
         {
            
format(fsave50"Model");
            
//DOF2_GetInt(string,fsave,GateInfo[g][gModel]);
            
GateInfo[g][gModel] = DOF2_GetInt(string,fsave);
            
format(fsave50"CX");
            
GateInfo[g][gCX] = DOF2_GetFloat(string,fsave);
            
format(fsave50"CY");
            
GateInfo[g][gCY] = DOF2_GetFloat(string,fsave);
            
format(fsave50"CZ");
            
GateInfo[g][gCZ] = DOF2_GetFloat(string,fsave);
            
format(fsave50"CRX");
            
GateInfo[g][gCRX] = DOF2_GetFloat(string,fsave);
            
format(fsave50"CRY");
            
GateInfo[g][gCRY] = DOF2_GetFloat(string,fsave);
            
format(fsave50"CRZ");
             
GateInfo[g][gCRZ] = DOF2_GetFloat(string,fsave);
            
format(fsave50"OX");
             
GateInfo[g][gOX] = DOF2_GetFloat(string,fsave);
            
format(fsave50"OY");
             
GateInfo[g][gOY] = DOF2_GetFloat(string,fsave);
            
format(fsave50"OZ");
             
GateInfo[g][gOZ] = DOF2_GetFloat(string,fsave);
            
format(fsave50"ORX");
             
GateInfo[g][gORX] = DOF2_GetFloat(string,fsave);
            
format(fsave50"ORY");
            
GateInfo[g][gORY] = DOF2_GetFloat(string,fsave);
            
format(fsave50"ORZ");
            
GateInfo[g][gORZ] = DOF2_GetFloat(string,fsave);
            
format(fsave50"Password");
              
GateInfo[g][gPassword] = DOF2_GetInt(string,fsave);
            
format(fsave50"Speed");
              
GateInfo[g][gSpeed] = DOF2_GetInt(string,fsave);
            
GateInfo[g][gGate] = CreateDynamicObject(GateInfo[g][gModel], GateInfo[g][gCX], GateInfo[g][gCY], GateInfo[g][gCZ], GateInfo[g][gCRX], GateInfo[g][gCRY], GateInfo[g][gCRZ]);
        }
    }

Reply
#2

Maybe it's related on an issue on your 'if' variables, check them again.
Where this code is placed on the gamemode?
Reply
#3

Quote:
Originally Posted by xEF
Посмотреть сообщение
Maybe it's related on an issue on your 'if' variables, check them again.
Where this code is placed on the gamemode?
No its not, i had at ongamemodeint and i moved it to there all the other stock.
Reply
#4

So if variables 'if' are not the problem creators, watching the code the only thing that i can say it's that are so much lines that save a value, in the stock, you should think on an 'else' structure in order to avoid bugs.
Or maybe where the stock is declaired to get loaded, it's bad.

Correct me if i am bad.
Reply
#5

Change this
PHP код:
format(fsave50"gates/%d.ini"g); 
        if(
DOF2_GetInt(stringfsave) != 0
         { 
to
PHP код:
format(string50"gates/%d.ini"g); 
        if(
fexist(string)) 
         { 
Reply
#6

Quote:
Originally Posted by jlalt
Посмотреть сообщение
Change this
PHP код:
format(fsave50"gates/%d.ini"g); 
        if(
DOF2_GetInt(stringfsave) != 0
         { 
to
PHP код:
format(string50"gates/%d.ini"g); 
        if(
fexist(string)) 
         { 
Thank you, now its working!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)