02.09.2009, 02:26
Ugh. This is really starting to make me pissed off. lol. Somehow the variables seem to have really messed up values. I try debugging by making a function HouseDebug and put it under onplayerpickuppickup instead of the normal functions so I could debug it.
Here is my function
The output is crazy..
I grab the pickup and my chat gets flooded like..
100
0
0
0
0
9
0
0
3
0
0
etc.. It doesn't go on and on, it stops within a second and I can see it does contain the values that the variables are suppose to have ex. 100 for the house cost but something is really messed up.
Same code is used as the first post + that is the debug function
I'm really in need of help..
Here is my function
pawn Код:
HouseDebug(playerid, pickupid)
{
for(new i=0;i<MAX_HOUSES;i++)
{
if(HousePickup[i] == pickupid)
{
new s1[32], s2[32], s3[32], s4[32], s5[32], s6[32], s7[32], s8[32];
format(s1, 32, "%d", i);
format(s2, 32, "%s", HouseInfo[i][Name]);
format(s3, 32, "%d", HouseInfo[i][Cost]);
format(s4, 32, "%d", HouseInfo[i][Rentable]);
format(s5, 32, "%d", HouseInfo[i][RentCost]);
format(s6, 32, "%d", HouseInfo[i][Sell]);
format(s7, 32, "%f", HouseInfo[i][IconX]);
format(s8, 32, "%f", HouseInfo[i][InteriorX]);
SendClientMessage(playerid, RED, s1);
SendClientMessage(playerid, RED, s2);
SendClientMessage(playerid, RED, s3);
SendClientMessage(playerid, RED, s4);
SendClientMessage(playerid, RED, s5);
SendClientMessage(playerid, RED, s6);
SendClientMessage(playerid, RED, s7);
SendClientMessage(playerid, RED, s8);
}
}
return 1;
}
I grab the pickup and my chat gets flooded like..
100
0
0
0
0
9
0
0
3
0
0
etc.. It doesn't go on and on, it stops within a second and I can see it does contain the values that the variables are suppose to have ex. 100 for the house cost but something is really messed up.
Same code is used as the first post + that is the debug function
I'm really in need of help..