error 028: invalid subscript (not an array or too many subscripts): "strval"
#1

Код:
C:\Users\Sam\Desktop\XF-RP(Win32)\gamemodes\EXE38.pwn(17960) : error 028: invalid subscript (not an array or too many subscripts): "strval"
C:\Users\Sam\Desktop\XF-RP(Win32)\gamemodes\EXE38.pwn(17960) : warning 215: expression has no effect
C:\Users\Sam\Desktop\XF-RP(Win32)\gamemodes\EXE38.pwn(17960) : error 001: expected token: ";", but found ")"
C:\Users\Sam\Desktop\XF-RP(Win32)\gamemodes\EXE38.pwn(17960) : error 029: invalid expression, assumed zero
C:\Users\Sam\Desktop\XF-RP(Win32)\gamemodes\EXE38.pwn(17960) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Line 17960 = Rhinos = strval[arrCoords[3]);
pawn Код:
LoadUSVehicles()
{
    new arrCoords[4][500];
    new strFromFile2[500];
    new File: file = fopen("usvehicles.ini", io_read);
    if (file)
    {
        fread(file, strFromFile2);
        splits(strFromFile2, arrCoords, ',');
        Humvees = strval(arrCoords[0]);
        if(Humvees < 0)
        {
            USMCLandVehicles[0] =   AddStaticVehicleEx(470,-1428.2958,298.6578,7.2161,269.0104,0,0, VEHICLE_RESPAWN); // Humvees
            USMCLandVehicles[1] =   AddStaticVehicleEx(470,-1428.2319,302.3978,7.2379,269.0065,0,0, VEHICLE_RESPAWN); // Humvee
            USMCLandVehicles[2] =   AddStaticVehicleEx(470,-1447.5679,276.4221,7.1487,180.7688,0,0, VEHICLE_RESPAWN); // Humvee
            USMCLandVehicles[3] =   AddStaticVehicleEx(470,-1544.5168,469.4605,7.1483,88.0117,0,0, VEHICLE_RESPAWN); // Humvee
            USMCLandVehicles[4] =   AddStaticVehicleEx(470,-1433.0636,456.6187,7.1455,358.0673,0,0, VEHICLE_RESPAWN); // Humvee
            USMCLandVehicles[5] =   AddStaticVehicleEx(470,-1436.5641,456.7365,7.1594,358.0692,0,0, VEHICLE_RESPAWN); // Humvee
            USMCLandVehicles[6] =   AddStaticVehicleEx(470,-1414.3424,462.6342,7.1460,270.2682,0,0, VEHICLE_RESPAWN); // Humvee
            USMCLandVehicles[7] =   AddStaticVehicleEx(470,-1400.8525,463.1705,7.1813,181.1927,0,0, VEHICLE_RESPAWN); // Humvee
            USMCLandVehicles[8] =   AddStaticVehicleEx(470,-1386.1943,463.1054,7.1849,180.9054,0,0, VEHICLE_RESPAWN); // Humvee
            USMCLandVehicles[9] =   AddStaticVehicleEx(470,-1371.0975,462.0252,7.1834,359.0617,0,0, VEHICLE_RESPAWN); // Humvee
            USMCLandVehicles[10] =  AddStaticVehicleEx(470,-1366.6798,461.9528,7.1795,359.0617,0,0, VEHICLE_RESPAWN); // Humvee
        }
        Barracks = strval(arrCoords[1]);
        if(Barracks < 0)
        {
            USMCLandVehicles[11] =  AddStaticVehicleEx(433,-1449.6810,269.3494,7.5663,270.1461,0,0, VEHICLE_RESPAWN); // Barracks
            USMCLandVehicles[12] =  AddStaticVehicleEx(433,-1449.6647,263.2026,7.6628,269.3083,0,0, VEHICLE_RESPAWN); // Barracks
            USMCLandVehicles[13] =  AddStaticVehicleEx(433,-1462.4880,458.1914,7.5717,0.1417,0,0, VEHICLE_RESPAWN);// Barracks
            USMCLandVehicles[14] =  AddStaticVehicleEx(433,-1456.6521,458.2028,7.5591,0.1417,0,0, VEHICLE_RESPAWN); // Barracks
            USMCLandVehicles[15] =  AddStaticVehicleEx(433,-1450.0375,458.2180,7.5647,0.1417,0,0, VEHICLE_RESPAWN); // Barracks
            USMCLandVehicles[16] =  AddStaticVehicleEx(433,-1589.7960,305.5069,7.6244,359.2400,0,0, VEHICLE_RESPAWN); // Barracks
            USMCLandVehicles[17] =  AddStaticVehicleEx(433,-1596.7046,312.6003,7.5606,271.0104,0,0, VEHICLE_RESPAWN); // Barracks
        }
        Blackhawks = strval(arrCoords[2]);
        if(Blackhawks < 0)
        {
            USMCLandVehicles[18] =  AddStaticVehicleEx(563,-1608.1272,283.2189,7.5144,178.8989,0,0, VEHICLE_RESPAWN); // Blackhawk
            USMCLandVehicles[19] =  AddStaticVehicleEx(563,-1412.1625,517.2675,18.5688,271.1543,0,0, VEHICLE_RESPAWN); // Blackhawk
            USMCLandVehicles[20] =  AddStaticVehicleEx(563,-1447.7098,428.6534,33.0369,272.9440,0,0, VEHICLE_RESPAWN); // Blackhawk
            USMCLandVehicles[21] =  AddStaticVehicleEx(563,-1267.9331,491.8079,18.5600,91.0060,0,0, VEHICLE_RESPAWN); // Blackhawk
        }
        Rhinos = strval[arrCoords[3]);
        if(Rhinos < 0)
        {
            USMCLandVehicles[22] =  AddStaticVehicleEx(432,-1537.1257,431.8441,7.0684,0.3208,0,0, VEHICLE_RESPAWN); // Abrams
            USMCLandVehicles[23] =  AddStaticVehicleEx(432,-1544.4359,431.8031,7.0676,0.3208,0,0, VEHICLE_RESPAWN); // Abrams
            USMCLandVehicles[24] =  AddStaticVehicleEx(432,-1530.7467,431.8808,7.0785,0.3208,0,0, VEHICLE_RESPAWN); // Abrams
        }
        for(new x;x<sizeof(USMCLandVehicles);x++)
        {
            SetTimerEx("OnVehicleSpawn", 10000, false, "i", USMCLandVehicles[x]);
        }
        fclose(file);
    }
    else
    {
        GameModeExit();
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)