Spawn Points
#1

Hello i added some spawn points to the gamemode that i am making and here are the following errors

pawn Код:
new Float:SpawnPoints[40][4] =
{
{2041.4232,-1643.7749,13.5469},
{2050.3225,-1901.5059,13.5469},
{1757.8662,-1893.7533,13.5561},
{1719.9373,-1709.5448,13.5000},
{1392.6620,-1573.8087,14.2513},
{1291.8687,-1485.8612,13.5469},
{1309.8313,-1373.3232,13.6131},
{1137.0586,-1378.6705,14.2813},
{996.2015,-1303.5378,13.3899},
{1186.2542,-1126.6255,24.0339},
{1093.9709,-1078.3153,27.5821},
{999.1002,-897.4241,42.2493},
{1012.3271,-769.9664,108.2267},
{309.8324,-1600.5162,33.1888},
{407.6028,-1543.4286,32.2734},
{433.1201,-1648.3763,25.5938},
{693.7420,-1572.2668,14.2422},
{824.8494,-1869.3324,12.8672},
{856.4250,-1644.4429,13.5584},
{2352.9812,1001.9236,10.8203,87.6178},
{2417.9851,1114.8572,10.8125,270.2919},
{2445.8699,1279.4567,10.8061,182.7706},
{2490.9990,1433.9799,10.8203,205.3045},
{2443.8264,1654.3289,10.8203,227.9582},
{1697.6488,1456.3223,10.7665,275.0996},
{1891.6893,2314.0139,10.8203,277.7439},
{1947.0715,2437.2217,10.8203,205.5250},
{2092.6616,2479.8145,10.8203,173.1116},
{2091.4067,2070.9500,10.8203,268.8218},
{2185.9917,2001.2933,10.8203,88.6423},
{2031.9304,1918.0876,12.3359,270.1340},
{1952.1302,2655.0112,10.8203,180.1662},
{994.6838,1985.7472,11.0389,272.6347},
{955.9548,1730.4478,8.6484,272.9977},
{-88.9428,1362.8306,10.2734,271.5778},
{-97.2324,1088.1873,19.7500,353.0189},
{-306.0002,1303.2164,53.6584,307.6807},
{-333.2935,1531.8217,75.3594,181.2123},
{-26.6790,2345.7227,24.1406,176.3719}
};


Error:
Код:
C:\Users\TOSHIBANET\Documents\Photoshop Documents\TeamDeathMatch\gamemodes\CNR.pwn(888) : error 052: multi-dimensional arrays must be fully initialized
Reply
#2

You did not add a rotation value(fourth number) to the first bunch of spawn locations.

You must fill out all cells in a multi-dimentional array when you initialize them with data.
Reply
#3

Can you show me a exsample i didnt get you
Reply
#4

Simple.

You say the variable contains 4 arrays, but there are only 3.

So change this
pawn Код:
new Float:SpawnPoints[40][4] =
To
pawn Код:
new Float:SpawnPoints[40][3] =
Reply
#5

Nope it isnt working it increases my errors with this
Reply
#6

What skimmer says is completely wrong.


What you are trying to do is make an array with spawn locations.
Each location has an x, y, z and an angle value.

However, the first few lines of coordinates only contain an x, y and z value:
{2041.4232,-1643.7749,13.5469},
You need to add an angle there as well, for example:
{2041.4232,-1643.7749,13.5469,0.0},

The second half of spawn locations already contain an angle.
Reply
#7

I didn't saw the last 18 coordinates. Just tought he's using only X, Y, Z
Reply
#8

NVM I FIXED IT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)