LoadBizz(Big Problem)
#1

i got an Loadbiz from friend.. but if i put it i get 1 error..

PHP код:
  public LoadBizz()
                        {
                            new 
file[120];
                            for(new 
idx 0idx sizeof(HouseInfo) ; idx++)
                            {
                                
format(filesizeof(file),"Bizzes/%d.ini"idx)
                
LINE       (9957)    >>      if(dini_Exists(file))
                                {
                                    
BizzInfo[idx][bOwned] = dini_Int(file,"Owned");
                                    
strmid(BizzInfo[idx][bOwner], dini_Get(file,"Owner"), 0strlen(dini_Get(file,"Owner")), 255);
                                    
strmid(BizzInfo[idx][bMessage], dini_Get(file,"Message"), 0strlen(dini_Get(file,"Message")), 255);
                                    
strmid(BizzInfo[idx][bExtortion], dini_Get(file,"ExtortionBy"), 0strlen(dini_Get(file,"ExtortionBy")), 255);
                                    
BizzInfo[idx][bEntranceX] = dini_Float(file,"Entrance_X");
                                    
BizzInfo[idx][bEntranceY] = dini_Float(file,"Entrance_Y");
                                    
BizzInfo[idx][bEntranceZ] = dini_Float(file,"Entrance_Z");
                                    
BizzInfo[idx][bExitX] = dini_Float(file,"Exit_X");
                                    
BizzInfo[idx][bExitY] = dini_Float(file,"Exit_Y");
                                    
BizzInfo[idx][bExitZ] = dini_Float(file,"Exit_Z");
                                    
BizzInfo[idx][bLevelNeeded] = dini_Int(file,"LevelNeeded");
                                    
BizzInfo[idx][bBuyPrice] = dini_Int(file,"Price");
                                    
BizzInfo[idx][bEntranceCost] = dini_Int(file,"EntranceCost");
                                    
BizzInfo[idx][bTill] = dini_Int(file,"Till");
                                    
BizzInfo[idx][bLocked] = dini_Int(file,"Locked");
                                    
BizzInfo[idx][bInterior] = dini_Int(file,"Interior");
                                    
BizzInfo[idx][bProducts] = dini_Int(file,"Products");
                                    
BizzInfo[idx][bMaxProducts] = dini_Int(file,"MaxProducts");
                                    
BizzInfo[idx][bPriceProd] = dini_Int(file,"ProductPrice");
                                    
BizzInfo[idx][bVirWorld] = dini_Int(file,"VirtualWorld");
                                    
BizzInfo[idx][bInteriorNr] = dini_Int(file,"InteriorNr");
                                    
BizzInfo[idx][bSetted] = dini_Int(file,"Setted");
                                }
                            }
                            print(
"[INFLAME]: BizU PULI");
                            return 
1;
                        } 
Errors:

(9957) : error 001: expected token: ";", but found "if"


EDIT:i change all positions and nothing...
Reply
#2

pawn Код:
format(file, sizeof(file),"Bizzes/%d.ini", idx)
replace to
pawn Код:
format(file, sizeof(file),"Bizzes/%d.ini", idx);
you missed the semicolon
Reply
#3

I really hate dini... It almost seem as if it is coming back from the dead...
Reply
#4

It tells you what type of error it is. The compiler expected a ";" but found an if on the next line.
****** the error types ffs and figure it out on your own.
Replace this
pawn Код:
format(file, sizeof(file),"Bizzes/%d.ini", idx)
with
Код:
format(file, sizeof(file),"Bizzes/%d.ini", idx); // You forgot the semicolon.
Maybe this should show you not to copy/paste.
Reply
#5

yeah reading is convenient
Reply
#6

i dont get it..

why is pawn not responding at this??

PHP код:
for(new 0sizeof(BizzInfo); h++)
                        if(
BizzInfo[h][bSetted] == 1)
                        {
                        if(
BizzInfo[h][bOwned] == 0)
                        {
                            
format(PropertyString,sizeof(PropertyString),"Afacere de vanzare \n Nume Afacere: %s \n Afacere ID: %d \n Pret: $%d \n Level Necesar: %d",BizzInfo[h][bMessage], BizzInfo[h][bVirWorld], BizzInfo[h][bBuyPrice], BizzInfo[h][bLevelNeeded]);
                            
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],5001);
                        }
                        else if(
BizzInfo[h][bOwned] == 1)
                        {
                            
format(PropertyString,sizeof(PropertyString),"%s \n Proprietarul: %s \n Nume Afacere: %d \n Extortion: %s \n Intrare Fee: $%d. \n Pentru a intra in bizz scrieti /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bVirWorld], BizzInfo[h][bExtortion], BizzInfo[h][bEntranceCost]);
                            
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FFFFAA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],5001);
                        }
                        
BizzPickup[h] = CreateDynamicPickup(1274,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
                        
pickups++;
                        }
                        } 
Reply
#7

Quote:
Originally Posted by admantis
Посмотреть сообщение
pawn Код:
format(file, sizeof(file),"Bizzes/%d.ini", idx)
replace to
pawn Код:
format(file, sizeof(file),"Bizzes/%d.ini", idx);
you missed the semicolon
Thank you with this.
Reply
#8

is this thing from firend wrong cauze i put it in my gm and it says pawno not responding... look:

PHP код:
            for(new 0sizeof(BizzInfo); h++)
                        if(
BizzInfo[h][bSetted] == 1)
                        {
                        if(
BizzInfo[h][bOwned] == 0)
                        {
                            
format(stringsizeof(string), "Afacere de vanzare \n Nume Afacere: %s \n Afacere ID: %d \n Pret: $%d \n Level Necesar: %d",BizzInfo[h][bMessage], BizzInfo[h][bVirWorld], BizzInfo[h][bBuyPrice], BizzInfo[h][bLevelNeeded]);
                            
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],5001);
                        }
                        else if(
BizzInfo[h][bOwned] == 1)
                        {
                            
format(stringsizeof(string), "%s \n Proprietarul: %s \n Nume Afacere: %d \n Extortion: %s \n Intrare Fee: $%d. \n Pentru a intra in bizz scrieti /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bVirWorld], BizzInfo[h][bExtortion], BizzInfo[h][bEntranceCost]);
                            
Create3DTextLabel(string ,0x00FFFFAA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],5001);
                        }
                        
BizzPickup[h] = CreateDynamicPickup(1274,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
                        
pickups++;
                        }
                        } 
Reply
#9

Everything is solved more easily and can be readed with more ease if you ident your code properly. In this case you missed an opening bracket. I suggest you read the basic scripting documentation before getting deep into loading and saving data before you even know how to indent your code properly and how brackets work.

pawn Код:
for(new h = 0; h < sizeof(BizzInfo); h++)
     {
        if(BizzInfo[h][bSetted] == 1)
        {
            if(BizzInfo[h][bOwned] == 0)
            {
                format(string, sizeof(string), "Afacere de vanzare \n Nume Afacere: %s \n Afacere ID: %d \n Pret: $%d \n Level Necesar: %d",BizzInfo[h][bMessage], BizzInfo[h][bVirWorld], BizzInfo[h][bBuyPrice], BizzInfo[h][bLevelNeeded]);
                BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
            }
            else if(BizzInfo[h][bOwned] == 1)
            {
                format(string, sizeof(string), "%s \n Proprietarul: %s \n Nume Afacere: %d \n Extortion: %s \n Intrare Fee: $%d. \n Pentru a intra in bizz scrieti /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bVirWorld], BizzInfo[h][bExtortion], BizzInfo[h][bEntranceCost]);
                Create3DTextLabel(string ,0x00FFFFAA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
            }
            BizzPickup[h] = CreateDynamicPickup(1274,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
            pickups++;
        }
    }
Reply
#10

Quote:
Originally Posted by admantis
Посмотреть сообщение
I suggest you read the basic scripting documentation before getting deep into loading and saving data before you even know how to indent your code properly and how brackets work.
^^^^^^^^^ THIS ^^^^^^^^^^^^^^


Stop using the GodFather Edit, not a good script for beginners.

Proof: This was taken straight from Raven's Roleplay. All I see you changed was the the language to Romanian.
pawn Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
    {
        if(HouseInfo[h][hSetted] == 1)
        {
            if(HouseInfo[h][hOwned] == 0)
            {
                if(HouseInfo[h][hSetted] == 1)
                {
                    format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[h][hWorld], HouseInfo[h][hValue],HouseInfo[h][hDiscription], HouseInfo[h][hLevel]);
                    HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);
                    HousePickup[h] = CreateDynamicPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
                }
            }
            else if(HouseInfo[h][hOwned] == 1)
            {
                format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: $%d \n Description: %s \n To Rent Type /rentroom",HouseInfo[h][hMessage],HouseInfo[h][hOwner],HouseInfo[h][hWorld], HouseInfo[h][hRent], HouseInfo[h][hDiscription]);
                HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FFFFAA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);
                HousePickup[h] = CreateDynamicPickup(1272, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
            }
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)