25.03.2013, 09:50
Hey there, first of all thank you for reading this.
Alright, so I've this code:
And it looks like not all of it gets executed.
I debugged it and only the first print is shown.. What may stop the code from working after the first print?
( NOTE: I tried printing inside the second loop just after the first print and nothing. )
Thank you in advance.
Alright, so I've this code:
pawn Код:
public OnFilterScriptInit()
{
for(new i = 0; i <= MAX_HOUSES; i++)
{
new sale = 1272;
format(file1, sizeof(file1), "Houses/House_%d.ini", i);
if(fexist(file1))
{
format(HouseText, sizeof(HouseText), "{31A353}[ {FFFFFF}House ID: %d {31A353}]", i);
if(HouseInfo[i][Owned] == true)
{
format(name1, sizeof(name1), "%s", dini_Get(file1, "Owner"));
rreplace(name1, '_', ' ');
format(HouseTextAdd, sizeof(HouseTextAdd), "\n{31A353}Owner: {FFFFFF}%s", name1);
strcat(HouseText, HouseTextAdd);
}
if(HouseInfo[i][ForSale] == true)
{
format(HouseTextAdd, sizeof(HouseTextAdd), "\n{31A353}Price: {FFFFFF}%d", HouseInfo[i][Price]);
strcat(HouseText, HouseTextAdd);
sale = 1273;
}
if(HouseInfo[i][ForRent] == true)
{
format(HouseTextAdd, sizeof(HouseTextAdd), "\n{31A353}Rent: {FFFFFF}%d\n{31A353}Commands: {FFFFFF}/rentroom, /unrent", dini_Int(file1, "RentPrice"));
strcat(HouseText, HouseTextAdd);
}
HouseLabel[i] = Create3DTextLabel(HouseText, 0xFFFFFFFF, HouseInfo[i][EnterX], HouseInfo[i][EnterY], HouseInfo[i][EnterZ], 20.0, 0, 0);
HousePickup[i] = CreatePickup(sale, 1, HouseInfo[i][EnterX], HouseInfo[i][EnterY], HouseInfo[i][EnterZ], 0);
}
}
print("haha");
for(new hloop = 0; hloop <= MAX_PLAYERS; hloop++)
{
print("haha");
HouseID[hloop] = -1;
InHouseID[hloop] = -1;
}
print("haha");
for(new houseloop = 0; houseloop <= MAX_HOUSES; houseloop++)
{
format(file1, 128, "Houses/House_%d.ini", houseloop);
HouseInfo[houseloop][EnterX] = dini_Float(file1, "EnterX");
HouseInfo[houseloop][EnterY] = dini_Float(file1, "EnterY");
HouseInfo[houseloop][EnterZ] = dini_Float(file1, "EnterZ");
HouseInfo[houseloop][ExitX] = dini_Float(file1, "ExitX");
HouseInfo[houseloop][ExitY] = dini_Float(file1, "ExitY");
HouseInfo[houseloop][ExitZ] = dini_Float(file1, "ExitZ");
HouseInfo[houseloop][Price] = dini_Int(file1, "Price");
HouseInfo[houseloop][RentPrice] = dini_Int(file1, "RentPrice");
HouseInfo[houseloop][Interior] = dini_Int(file1, "Interior");
HouseInfo[houseloop][Owned] = dini_Bool(file1, "Owned") ? true : false;
HouseInfo[houseloop][ForRent] = dini_Bool(file1, "ForRent") ? true : false;
HouseInfo[houseloop][Locked] = dini_Bool(file1, "Locked") ? true : false;
HouseInfo[houseloop][ForSale] = dini_Bool(file1, "ForSale") ? true : false;
}
print(" It should work gsdgsdhsdgsdgsgsdgsdg. ");
return 1;
}
I debugged it and only the first print is shown.. What may stop the code from working after the first print?
( NOTE: I tried printing inside the second loop just after the first print and nothing. )
Thank you in advance.