compiler crash
#1

PHP код:
CMD:createshop(playerid, params[])
    new 
string[80], file[50], labeltext[50], Float:X, Float:Y, Float:Z;
       new 
store[15];
    
// if(!IsPlayerAdmin(playerid)) return 0;
    
if(sscanf(params, "d", store)) return SendClientMessage(playerid, 0xB60000FF, "Usage: /createshop (level)");
    if(
store <= 2 ) return SendClientMessage(playerid, 0xB60000FF, "Usage: /createshop (level)");
    else
    {
        if(!
dini_Exists("SRB.ini"))
        {
            
dini_Create("SRB.ini");
        }
        
GetPlayerPos(playerid, X, Y, Z);
        
dini_IntSet("SRB.ini", "TotalBuilding", (dini_Int("SRB.ini", "TotalBuilding") + 1));
        new 
ammunationid = dini_Int("SRB.ini", "CurrentAmmunationID");
        if(
ammunationid >= MAX_AMMUNATIONS) return SendClientMessage(playerid, 0xB60000FF, "Unable to create more ammunations. There are already "#MAX_AMMUNATIONS" created. Increase limit in the script to create more.");
        
else
        {
                
format(string, sizeof(string), "Ammunation ID %d Created.", ammunationid);
                
format(labeltext, sizeof(labeltext), "Type /scanvenge to Search");
                
format(file, sizeof(file), "/Files/%d.ini", ammunationid);
                if(!
dini_Exists(file))
                {
                     
dini_Create(file);
                }
                
dini_IntSet("SRB.ini", "CurrentAmmunationID", (ammunationid + 1));
                
dini_IntSet("SRB.ini", "CurrentAmmunationWorld", (ammunationid + 1000));
                
AmmunationCPOut[ammunationid] = CreateDynamicCP(X, Y, Z, 1.5, 0, 0, -1, 25.0);
        }
        
StoreLabel[dini_Int(file, "StoreID")] = Create3DTextLabel(labeltext, 0x00BC00FF, X, Y, Z, 25, 0, 1);
        
dini_Set(file, "StoreName", labeltext);
        
dini_FloatSet(file, "CPOutX", X);
        
dini_FloatSet(file, "CPOutY", Y);
        
dini_FloatSet(file, "CPOutZ", Z);
        
GetPosInFrontOfPlayer(playerid, X, Y, -2.5);
        
dini_IntSet(file, "StoreID", dini_Int("SRB.ini", "TotalBuilding"));
        
SendClientMessage(playerid, 0xFFFF00AA, string);
    }
        return 
1;
} 
here's my command
My compiler crash after adding these lines here
PHP код:
       new store[15];
    
// if(!IsPlayerAdmin(playerid)) return 0;
    
if(sscanf(params, "d", store)) return SendClientMessage(playerid, 0xB60000FF, "Usage: /createshop (level)");
    if(
store <= 2 ) return SendClientMessage(playerid, 0xB60000FF, "Usage: /createshop (level)");
    else
    { 
and before return I closed barrel with
PHP код:
} 
Reply
#2

yes its working now thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)