15.02.2012, 13:13
Erros
Linha
Funзao
pawn Код:
C:\Documents and Settings\Don_SpeeD\Desktop\BVC\gamemodes\BVC1.0.pwn(8427) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Don_SpeeD\Desktop\BVC\gamemodes\BVC1.0.pwn(8427) : warning 215: expression has no effect
C:\Documents and Settings\Don_SpeeD\Desktop\BVC\gamemodes\BVC1.0.pwn(8427) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Don_SpeeD\Desktop\BVC\gamemodes\BVC1.0.pwn(8427) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Don_SpeeD\Desktop\BVC\gamemodes\BVC1.0.pwn(8427) : fatal error 107: too many error messages on one line
pawn Код:
StripNewLine(LineFromFile);
pawn Код:
stock FixHouses()
{
new file[100], File:PFile, Name[24], LineFromFile[100], ParameterName[50], ParameterValue[50];
new bool:PlayerOwnedTheHouse = true, HousesFixed;
for (new HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
{
if (AHouseData[HouseID][Owned] == true)
{
format(Name, 24, AHouseData[HouseID][Owner]);
format(file, sizeof(file), PlayerFile, Name);
if (fexist(file))
{
PFile = fopen(file, io_read);
fread(PFile, LineFromFile);
while (strlen(LineFromFile) > 0)
{
StripNewLine(LineFromFile);//linhaerro
sscanf(LineFromFile, "s[50]s[50]", ParameterName, ParameterValue);
if (strcmp(ParameterName, "House", false) == 0)
{
if (strval(ParameterValue) == HouseID)
PlayerOwnedTheHouse = true;
}
fread(PFile, LineFromFile);
}
fclose(PFile);
if (PlayerOwnedTheHouse == false)
{
AHouseData[HouseID][Owned] = false;
AHouseData[HouseID][Owner] = 0;
AHouseData[HouseID][HouseName] = 0;
AHouseData[HouseID][HouseLevel] = 1;
House_UpdateEntrance(HouseID);
HouseFile_Save(HouseID);
HousesFixed++;
}
PlayerOwnedTheHouse = false;
}
}
}
printf(TXT_HousesFixed, HousesFixed);
}