brackets problem -
Barnwell - 25.07.2017
I don't see any errors here
pawn Код:
public LoadProperty()
{
new file[64];
for(new idx = 0; idx < sizeof(HouseInfo) ; idx++)
{
format(file, sizeof(file),"LARP/Properties/%d.ini", idx)
if(dini_Exists(file))
{
HouseInfo[idx][hEntrancex] = dini_Float(file,"Entrance_X");
HouseInfo[idx][hEntrancey] = dini_Float(file,"Entrance_Y");
HouseInfo[idx][hEntrancez] = dini_Float(file,"Entrance_Z");
HouseInfo[idx][hExitx] = dini_Float(file,"Exit_X");
HouseInfo[idx][hExity] = dini_Float(file,"Exit_Y");
HouseInfo[idx][hExitz] = dini_Float(file,"Exit_Z");
HouseInfo[idx][hHealthx] = dini_Int(file,"Health_X");
HouseInfo[idx][hHealthy] = dini_Int(file,"Health_Y");
HouseInfo[idx][hHealthz] = dini_Int(file,"Health_Z");
HouseInfo[idx][hArmourx] = dini_Int(file,"Armour_X");
HouseInfo[idx][hArmoury] = dini_Int(file,"Armour_Y");
HouseInfo[idx][hArmourz] = dini_Int(file,"Armour_Z");
strmid(HouseInfo[idx][hOwner], dini_Get(file,"Owner"), 0, strlen(dini_Get(file,"Owner")), 255);
strmid(HouseInfo[idx][hDiscription], dini_Get(file,"Description"), 0, strlen(dini_Get(file,"Description")), 255);
HouseInfo[idx][hValue] = dini_Int(file,"Price");
HouseInfo[idx][hHel] = dini_Int(file,"Health");
HouseInfo[idx][hArm] = dini_Int(file,"Armour");
HouseInfo[idx][hInt] = dini_Int(file,"Interior");
HouseInfo[idx][hLock] = dini_Int(file,"Locked");
HouseInfo[idx][hOwned] = dini_Int(file,"Owned");
HouseInfo[idx][hRooms] = dini_Int(file,"Rooms");
HouseInfo[idx][hRent] = dini_Int(file,"Rentable");
HouseInfo[idx][hRentabil] = dini_Int(file,"RentPrice");
HouseInfo[idx][hTakings] = dini_Int(file,"Takings");
HouseInfo[idx][hSetted] = dini_Int(file,"Setted");
HouseInfo[idx][hLevel] = dini_Int(file,"LevelNeeded");
HouseInfo[idx][hWorld] = dini_Int(file,"World");
HouseInfo[idx][hDrugs] = dini_Int(file,"Drugs");
HouseInfo[idx][hMaterials] = dini_Int(file,"Materials");
HouseInfo[idx][hWeapon1] = dini_Int(file,"Weapon1");
HouseInfo[idx][hAmmo1] = dini_Int(file,"Ammo1");
HouseInfo[idx][hWeapon2] = dini_Int(file,"Weapon2");
HouseInfo[idx][hAmmo2] = dini_Int(file,"Ammo2");
HouseInfo[idx][hWeapon3] = dini_Int(file,"Weapon3");
HouseInfo[idx][hAmmo3] = dini_Int(file,"Ammo3");
HouseInfo[idx][hWeapon4] = dini_Int(file,"Weapon4");
HouseInfo[idx][hAmmo4] = dini_Int(file,"Ammo4");
HouseInfo[idx][hWeapon5] = dini_Int(file,"Weapon5");
HouseInfo[idx][hAmmo5] = dini_Int(file,"Ammo5");
HouseInfo[idx][hWeapon6] = dini_Int(file,"Weapon6");
HouseInfo[idx][hAmmo6] = dini_Int(file,"Ammo6");
HouseInfo[idx][hDate] = dini_Int(file,"Date");
strmid(HouseInfo[idx][hMessage], dini_Get(file,"Message"), 0, strlen(dini_Get(file,"Message")), 255);
}
}
print("[SCRIPT]: Loaded Houses");
return 1;
}
pawn Код:
C:\Users\User\Desktop\Test RP\gamemodes\wcrp.pwn(6095) : warning 203: symbol is never used: "string"
C:\Users\User\Desktop\Test RP\gamemodes\wcrp.pwn(10777) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Here is the line
Re: brackets problem -
Barnwell - 25.07.2017
Why none is helping?
Re: brackets problem -
Kane - 25.07.2017
Код:
format(file, sizeof(file),"LARP/Properties/%d.ini", idx)
You're missing a semicolon.
FYI, you should use an array for your weapons instead of Weapon1, Weapon2, Weapon3.
hWeapon[6], hAmmo[6] would be more convenient and save you time in the future.
Quote:
Originally Posted by Barnwell
Why none is helping?
|
Be patient???
Re: brackets problem -
Barnwell - 25.07.2017
Thanks, but its not working
Re: brackets problem -
Kane - 25.07.2017
What's the error?
Re: brackets problem -
Barnwell - 25.07.2017
I comment weapon6 < weapon5 < weapon 4< ammo6,5,4 also
Because I don't need them here is the good of the house
pawn Код:
forward LoadProperty();
public LoadProperty()
{
new file[64];
for(new idx = 0; idx < sizeof(HouseInfo); idx++)
{
format(file, sizeof(file),"LARP/Properties/%d.ini", idx)
if(dini_Exists(file))
{
HouseInfo[idx][hEntrancex] = dini_Float(file,"Entrance_X");
HouseInfo[idx][hEntrancey] = dini_Float(file,"Entrance_Y");
HouseInfo[idx][hEntrancez] = dini_Float(file,"Entrance_Z");
HouseInfo[idx][hExitx] = dini_Float(file,"Exit_X");
HouseInfo[idx][hExity] = dini_Float(file,"Exit_Y");
HouseInfo[idx][hExitz] = dini_Float(file,"Exit_Z");
HouseInfo[idx][hHealthx] = dini_Int(file,"Health_X");
HouseInfo[idx][hHealthy] = dini_Int(file,"Health_Y");
HouseInfo[idx][hHealthz] = dini_Int(file,"Health_Z");
HouseInfo[idx][hArmourx] = dini_Int(file,"Armour_X");
HouseInfo[idx][hArmoury] = dini_Int(file,"Armour_Y");
HouseInfo[idx][hArmourz] = dini_Int(file,"Armour_Z");
strmid(HouseInfo[idx][hOwner], dini_Get(file,"Owner"), 0, strlen(dini_Get(file,"Owner")), 255);
strmid(HouseInfo[idx][hDiscription], dini_Get(file,"Description"), 0, strlen(dini_Get(file,"Description")), 255);
HouseInfo[idx][hValue] = dini_Int(file,"Price");
HouseInfo[idx][hHel] = dini_Int(file,"Health");
HouseInfo[idx][hArm] = dini_Int(file,"Armour");
HouseInfo[idx][hInt] = dini_Int(file,"Interior");
HouseInfo[idx][hLock] = dini_Int(file,"Locked");
HouseInfo[idx][hOwned] = dini_Int(file,"Owned");
HouseInfo[idx][hRooms] = dini_Int(file,"Rooms");
HouseInfo[idx][hRent] = dini_Int(file,"Rentable");
HouseInfo[idx][hRentabil] = dini_Int(file,"RentPrice");
HouseInfo[idx][hTakings] = dini_Int(file,"Takings");
HouseInfo[idx][hSetted] = dini_Int(file,"Setted");
HouseInfo[idx][hLevel] = dini_Int(file,"LevelNeeded");
HouseInfo[idx][hWorld] = dini_Int(file,"World");
HouseInfo[idx][hDrugs] = dini_Int(file,"Drugs");
HouseInfo[idx][hMaterials] = dini_Int(file,"Materials");
HouseInfo[idx][hWeapon1] = dini_Int(file,"Weapon1");
HouseInfo[idx][hAmmo1] = dini_Int(file,"Ammo1");
HouseInfo[idx][hWeapon2] = dini_Int(file,"Weapon2");
HouseInfo[idx][hAmmo2] = dini_Int(file,"Ammo2");
HouseInfo[idx][hWeapon3] = dini_Int(file,"Weapon3");
HouseInfo[idx][hAmmo3] = dini_Int(file,"Ammo3");
HouseInfo[idx][hDate] = dini_Int(file,"Date");
strmid(HouseInfo[idx][hMessage], dini_Get(file,"Message"), 0, strlen(dini_Get(file,"Message")), 255);
}
}
print("[SCRIPT]: Loaded Houses");
return 1;
}
enum houses // MYSQL HOUSES
{
hDBID,
Float:hEntrancex,
Float:hEntrancey,
Float:hEntrancez,
Float:hExitx,
Float:hExity,
Float:hExitz,
hHealthx,
hHealthy,
hHealthz,
hArmourx,
hArmoury,
hArmourz,
hDate,
hRooms,
hOwner[MAX_PLAYER_NAME],
hDiscription[64],
hValue,
hHel,
hArm,
hInt,
hLock,
hOwned,
hRent,
hRentabil,
hTakings,
hLevel,
hWorld,
hSetted,
hMaterials,
hWeapon1,
hAmmo1,
hWeapon2,
hAmmo2,
hWeapon3,
hAmmo3,
hMessage[64],
hExVW,
hExINT,
hDrugs[8]
};
new HouseInfo[MAX_HOUSES][houses];
Re: brackets problem -
Kane - 25.07.2017
So what's the problem...?
Re: brackets problem -
Barnwell - 25.07.2017
I don't know.
Re: brackets problem -
Kane - 25.07.2017
What isn't working?
Are you getting an error? You aren't giving any details.
Re: brackets problem -
Barnwell - 25.07.2017
Its worked now.