SA-MP Forums Archive
Weird errors with spawns - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Weird errors with spawns (/showthread.php?tid=547790)



Weird errors with spawns - LocMax - 25.11.2014

Getting these errors even tho I don't see anything wrong..

Код:
error 001: expected token: "}", but found "{"
error 055: start of function body without function header
error 010: invalid function or declaration
pawn Код:
new Float:Spawns[][4] =
{
    {395.3744,-1799.8812,7.8281,2.9473},
    {595.5536,-1243.5162,18.1057,22.3843},
    {656.2115,-1225.1598,16.7225,70.0481},
    {1004.4772,-1361.2067,13.3209,357.1465},
    {1169.7753,-1489.6567,22.7650,89.2481},
    {2807.9282,-1176.8883,25.3805,173.6018},
    {2621.5681,-2227.2996,13.3710,86.5449},
    {1938.9319,-2147.9319,13.5547,179.5551},
    {1446.3792,-2286.4343,13.5469,92.1186},
    {1235.4366,-2037.1150,61.0313,272.8595}

    {-1935.0742,678.1586,46.5625,356.4240},
    {-1922.5177,680.0504,46.5625,2.6907},
    {-1934.6843,264.8631,41.0469,276.9846},
    {-2022.3842,155.8002,28.8359,266.6432},
    {-2314.1555,-169.0953,35.3203,178.2457},
    {-2126.3633,-383.9755,35.3359,2.5950},
    {-2720.4807,-317.9581,7.8438,41.5845},
    {-2521.2214,-621.2564,132.7300,1.2376},
    {-1928.7382,-790.2328,32.1506,273.2949},
    {-1953.3707,1339.3734,7.1875,174.4267}

    {1098.1039,1609.9438,12.5469,180.6180},
    {2007.6625,1544.3978,12.9850,272.5070},
    {2024.0055,1343.0667,10.8203,268.3386},
    {2476.1292,1340.7408,10.8289,87.9012},
    {2496.2332,1434.5453,10.8203,189.2649},
    {2483.7869,1527.8451,11.0802,319.4963},
    {2092.6619,2075.7512,10.8203,270.5955},
    {2095.9263,1285.3276,10.8203,1.1614},
    {1995.7908,1073.3232,10.8203,8.5701},
    {1705.8315,1255.5388,10.6813,353.0535}
};



Re: Weird errors with spawns - Write - 25.11.2014

Change
new Float:Spawns[][4]

to

new Float:Spawns[][]


Re: Weird errors with spawns - Schneider - 25.11.2014

You forgot a comma at the end of the 10th and 20th coordinate-line.
In arrays only the very last line doesn't require a comma at the end.


Re: Weird errors with spawns - Quickie - 25.11.2014

pawn Код:
new Float:Spawns[][4] =
{
    {395.3744,-1799.8812,7.8281,2.9473},
    {595.5536,-1243.5162,18.1057,22.3843},
    {656.2115,-1225.1598,16.7225,70.0481},
    {1004.4772,-1361.2067,13.3209,357.1465},
    {1169.7753,-1489.6567,22.7650,89.2481},
    {2807.9282,-1176.8883,25.3805,173.6018},
    {2621.5681,-2227.2996,13.3710,86.5449},
    {1938.9319,-2147.9319,13.5547,179.5551},
    {1446.3792,-2286.4343,13.5469,92.1186},
    {1235.4366,-2037.1150,61.0313,272.8595},  // <<<<<<

    {-1935.0742,678.1586,46.5625,356.4240},
    {-1922.5177,680.0504,46.5625,2.6907},
    {-1934.6843,264.8631,41.0469,276.9846},
    {-2022.3842,155.8002,28.8359,266.6432},
    {-2314.1555,-169.0953,35.3203,178.2457},
    {-2126.3633,-383.9755,35.3359,2.5950},
    {-2720.4807,-317.9581,7.8438,41.5845},
    {-2521.2214,-621.2564,132.7300,1.2376},
    {-1928.7382,-790.2328,32.1506,273.2949},
    {-1953.3707,1339.3734,7.1875,174.4267},       // <<<<<<<<

    {1098.1039,1609.9438,12.5469,180.6180},
    {2007.6625,1544.3978,12.9850,272.5070},
    {2024.0055,1343.0667,10.8203,268.3386},
    {2476.1292,1340.7408,10.8289,87.9012},
    {2496.2332,1434.5453,10.8203,189.2649},
    {2483.7869,1527.8451,11.0802,319.4963},
    {2092.6619,2075.7512,10.8203,270.5955},
    {2095.9263,1285.3276,10.8203,1.1614},
    {1995.7908,1073.3232,10.8203,8.5701},
    {1705.8315,1255.5388,10.6813,353.0535}
};