help me
#1

At random spawn i copy this:

new Float:RandomSpawns[][] =
{
{2019.5605, 1342.9292, 10.8130, 269.6241},
{2173.3254, 1413.6172, 11.0625, 91.6514},
{2029.7556, 1008.3373, 10.8203, 266.1024},
{1584.5201, 1516.7324, 10.8318, 152.0789},
{340.4337, 2536.5776, 16.7865, 178.8486},
{-542.6747, 2592.3892, 53.5156, 272.1947},
{-1299.0413, -291.0421, 14.1484, 314.6614},
{-1475.9054, -210.6690, 14.1484, 335.9929},
{-2049.0117, -103.5660, 35.2071, 180.0000},
{2521.3262, -1678.7485, 15.3710, 89.9897},
{2134.3323, -2597.0308, 13.5469, 77.7263},
}: //<-- this is the line eror is, pls help

and on player spawn:

public OnPlayerSpawn(playerid)
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
return 1;
}


and i get this eror:
C:\Users\Mario\Desktop\matta\Mata Server\gamemodes\Test.pwn(294) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

pawn Код:
new Float:RandomSpawns[][] =
{
{2019.5605, 1342.9292, 10.8130, 269.6241},
{2173.3254, 1413.6172, 11.0625, 91.6514},
{2029.7556, 1008.3373, 10.8203, 266.1024},
{1584.5201, 1516.7324, 10.8318, 152.0789},
{340.4337, 2536.5776, 16.7865, 178.8486},
{-542.6747, 2592.3892, 53.5156, 272.1947},
{-1299.0413, -291.0421, 14.1484, 314.6614},
{-1475.9054, -210.6690, 14.1484, 335.9929},
{-2049.0117, -103.5660, 35.2071, 180.0000},
{2521.3262, -1678.7485, 15.3710, 89.9897},
{2134.3323, -2597.0308, 13.5469, 77.7263},
}; //use this
Reply
#3

YOu have to replace the "}:" with the "};" this is the error that you've over there.
Reply
#4

if i do that:

new Float:RandomSpawns[][] =
{
{2019.5605, 1342.9292, 10.8130, 269.6241},
{2173.3254, 1413.6172, 11.0625, 91.6514},
{2029.7556, 1008.3373, 10.8203, 266.1024},
{1584.5201, 1516.7324, 10.8318, 152.0789},
{340.4337, 2536.5776, 16.7865, 178.8486},
{-542.6747, 2592.3892, 53.5156, 272.1947},
{-1299.0413, -291.0421, 14.1484, 314.6614},
{-1475.9054, -210.6690, 14.1484, 335.9929},
{-2049.0117, -103.5660, 35.2071, 180.0000},
{2521.3262, -1678.7485, 15.3710, 89.9897},
{2134.3323, -2597.0308, 13.5469, 77.7263},
};

error:
C:\Users\Mario\Desktop\matta\Mata Server\gamemodes\Test.pwn(294) : error 029: invalid expression, assumed zero
C:\Users\Mario\Desktop\matta\Mata Server\gamemodes\Test.pwn(294) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#5

pawn Код:
new Float:RandomSpawns[][] =
{
{2019.5605, 1342.9292, 10.8130, 269.6241},
{2173.3254, 1413.6172, 11.0625, 91.6514},
{2029.7556, 1008.3373, 10.8203, 266.1024},
{1584.5201, 1516.7324, 10.8318, 152.0789},
{340.4337, 2536.5776, 16.7865, 178.8486},
{-542.6747, 2592.3892, 53.5156, 272.1947},
{-1299.0413, -291.0421, 14.1484, 314.6614},
{-1475.9054, -210.6690, 14.1484, 335.9929},
{-2049.0117, -103.5660, 35.2071, 180.0000},
{2521.3262, -1678.7485, 15.3710, 89.9897},
{2134.3323, -2597.0308, 13.5469, 77.7263}
};
Reply
#6

thank you
Reply
#7

[deleted
Reply
#8

Np Let me tell you what prob is so you understand:

Your code where:
pawn Код:
new Float:RandomSpawns[][] =
{
{2019.5605, 1342.9292, 10.8130, 269.6241},
{2173.3254, 1413.6172, 11.0625, 91.6514},
{2029.7556, 1008.3373, 10.8203, 266.1024},
{1584.5201, 1516.7324, 10.8318, 152.0789},
{340.4337, 2536.5776, 16.7865, 178.8486},
{-542.6747, 2592.3892, 53.5156, 272.1947},
{-1299.0413, -291.0421, 14.1484, 314.6614},
{-1475.9054, -210.6690, 14.1484, 335.9929},
{-2049.0117, -103.5660, 35.2071, 180.0000},
{2521.3262, -1678.7485, 15.3710, 89.9897},
{2134.3323, -2597.0308, 13.5469, 77.7263},
};
At the last line before };

You hade a , That is not needed when somefhing ends like an enum the last enum dosent need a ,
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)