01.01.2014, 21:03
Ok, Let me explain!
Well... My server consists of a few different maps... The teams spawn in the air and skydive to the ground... Well, at least that's how I want it to be... Anyway, I get the folloowing errors... I though I had it right... I've done this before and it worked before... Please help :O...MY ERRORS
Quote:
C:\Program Files\Rockstar Games\SA-MP Servers\New Gamemode\gamemodes\hgames.pwn(131) : error 052: multi-dimensional arrays must be fully initialized C:\Program Files\Rockstar Games\SA-MP Servers\New Gamemode\gamemodes\hgames.pwn(875) : error 001: expected token: "]", but found "-identifier-" C:\Program Files\Rockstar Games\SA-MP Servers\New Gamemode\gamemodes\hgames.pwn(875) : warning 215: expression has no effect C:\Program Files\Rockstar Games\SA-MP Servers\New Gamemode\gamemodes\hgames.pwn(875) : error 001: expected token: ";", but found "]" C:\Program Files\Rockstar Games\SA-MP Servers\New Gamemode\gamemodes\hgames.pwn(875) : error 029: invalid expression, assumed zero C:\Program Files\Rockstar Games\SA-MP Servers\New Gamemode\gamemodes\hgames.pwn(875) : fatal error 107: too many error messages on one line |
MY ARRAY OF MULTIDIMENSIONAL RANDOM SPAWNS
pawn Код:
enum CoordsEnum {Float:X, Float:Y, Float:Z, Float:R}
new Float:RandomSpawns[4][][CoordsEnum] =
{
{//Tiny
{-859.08588, -1483.33228, 180.00, 0.0},
{-843.31732, -1469.51624, 180.00, 90.0},
{-825.83923, -1497.14917, 180.00, 180.0}
},
{//Small
{-1408.41870, -1161.62622, 275.00, 0.0},
{-1406.61230, -1020.11530, 275.00, 90.0}
}, //Line 130
{//Medium
{-556.83093, -1877.42908, 140.00, 270.0},
{-1501.01196, -2558.48364, 140.00, 0.0},
{-1620.23572, -2521.15186, 140.00, 90.0},
{-1761.60876, -2402.02563, 140.00, 180.0},
{-1584.25012, -2286.64746, 140.00, 270.0},
{-1583.95947, -2108.97778, 140.00, 0.0},
{-1714.08203, -2263.05835, 140.00, 90.0},
{-1760.91309, -2126.62720, 140.00, 180.0},
{-1659.97388, -1963.49854, 140.00, 270.0},
{-1538.49695, -1953.30139, 140.00, 0.0}
},
{//Large
{-979.91943, -2383.63232, 140.00, 0.0},
{-863.63513, -2246.31689, 140.00, 90.0},
{-715.11560, -2032.36670, 140.00, 180.0},
{-556.83093, -1877.42908, 140.00, 270.0},
{-627.22974, -2038.50146, 140.00, 90.0},
{-575.54437, -1847.86475, 140.00, 180.0},
{-818.02191, -2046.55896, 140.00, 270.0},
{-838.22693, -2196.45801, 140.00, 90.0},
{-952.39465, -2208.23022, 140.00, 180.0},
{-905.45074, -2392.82959, 140.00, 270.0},
{-1068.09082, -2432.40161, 140.00, 0.0}
}
};
CODE USED TO SPAWN PLAYERS
pawn Код:
stock SetupPlayerSpawn(playerid)
{
new rand = random(sizeof(RandomSpawns[sData[Map]])); //Line 875
SetPlayerPos(playerid,
RandomSpawns[sData[Map]][rand][X],
RandomSpawns[sData[Map]][rand][Y],
RandomSpawns[sData[Map]][rand][Z]);
SetPlayerFacingAngle(playerid, RandomSpawns[sData[Map]][rand][R]);
}