error 029: invalid expression, assumed zero
#1

Help me please this is the error's

pawn Код:
C:\Users\Administrator\Desktop\All Folders\Scripting\0.3c test\gamemodes\lvdm.pwn(238) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\All Folders\Scripting\0.3c test\gamemodes\lvdm.pwn(238) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\All Folders\Scripting\0.3c test\gamemodes\lvdm.pwn(238) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\All Folders\Scripting\0.3c test\gamemodes\lvdm.pwn(238) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\All Folders\Scripting\0.3c test\gamemodes\lvdm.pwn(238) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
This Is The Line that is getting the error's/warnings.
pawn Код:
if (IsValidDynamicPickup(AHouseData[HouseID][PickupID]))
        {
Reply
#2

Show AHouseData enum.
Reply
#3

pawn Код:
// Setup a custom type that holds all data for houses
enum THouseData
{
    PickupID, // Holds the pickup-id that is linked to this house
    Text3D:DoorText, // Holds the reference to the 3DText above the house's pickup
    MapIconID, // Holds the ID of the mapicon for the house

    bool:Owned, // Holds true if the house is owned by somebody
    Owner[24], // Holds the name of the owner of the house

    HouseName[100], // Holds the name of the house (this will be displayed above the pickup near the house when it's owned)
    Float:HouseX, // Holds the X-coordinate of the pickup for the house
    Float:HouseY, // Holds the Y-coordinate of the pickup for the house
    Float:HouseZ, // Holds the Z-coordinate of the pickup for the house
    HouseLevel, // Holds the level of upgrades the house has, and defines which interior to use when you enter the house
    HouseMaxLevel, // Holds the maximum level this house can be upgraded to
    HousePrice, // Holds the price for buying the house, the same price applies when upgrading a house per level (multiplied by HouseUpgradePercent/100)
    bool:HouseOpened, // Holds true if the house is open to the public (anyone can enter), false means: only the owner can enter it
    bool:Insurance, // Holds "true" if the house has an insurance for the vehicles belonging to this house
    VehicleIDs[10], // Holds the vehicle-id's of the vehicles linked to this house (max 10 vehicles per house)

    bool:StaticHouse, // Holds "true" if the house is static (cannot be upgraded and has a fixed interior)
    CarSlots // Holds the amount of carslots available
}
// Holds the data for all houses
new AHouseData[MAX_HOUSES][THouseData];
This?
Reply
#4

Shouldn't you use this, then?
pawn Код:
if(IsValidDynamicPickup(THouseData[HouseID][PickupID]))
Reply
#5

Shouldn't need it?
Reply
#6

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

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++;
                }
            }
        }
    }
Reply
#7

Oh...So Change It I did but i still get same error's/warnings!
Reply
#8

Can anyone help me?
Reply
#9

I fixed it, i don't know what i did but i did fix it...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)