26.09.2011, 07:23
It keeps repeating the errors on the same thing untill it gets to Aplayerdata and then i get 6 errors
So Here is the code
So Here is the code
pawn Код:
public OnPlayerConnect(playerid)
{
// Setup local variables
new HouseID, HouseSlot, Name[24];
// Get the player's name
GetPlayerName(playerid, Name, sizeof(Name));
// Loop through all houses to find the ones which belong to this player
for (HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
{
// Check if the house exists
if (IsValidDynamicPickup(AHouseData[HouseID][PickupID]))
{
// Check if the house is owned
if (AHouseData[HouseID][Owned] == true)
{
// Check if the player is the owner of the house
if (strcmp(AHouseData[HouseID][Owner], Name, false) == 0)
{
// Add the HouseID to the player's account for faster reference later on
APlayerData[playerid][Houses][HouseSlot] = HouseID;
// Load housecars if they weren't loaded at FilterscriptInit
if (LoadCarsDuringFSInit == false)
HouseFile_LoadCars(HouseID);
// Select the next HouseSlot
HouseSlot++;
}
}
}
}