Why is this crashing my server?
#1

pawn Код:
new Float:SweepMission[1][][3] =
{
    {
        {1008.6558,-1156.7506,23.5620},
        {1054.1495,-1156.6805,23.3986},
        {1106.6068,-1157.0409,23.5532},
        {1181.3325,-1157.3451,23.5885},
        {1241.6050,-1156.8445,23.3801},
        {1294.9736,-1156.8254,23.5533},
        {1334.4518,-1156.8547,23.5533},
        {1335.4366,-1174.7106,23.1435},
        {1335.0873,-1220.4663,14.8859},
        {1334.4318,-1262.0100,13.2720},
        {1334.7177,-1272.1563,13.2719},
        {1302.3652,-1273.8448,13.2720},
        {1247.7269,-1272.3052,13.2721},
        {1213.3578,-1273.3846,13.1080},
        {1181.8145,-1273.3297,13.2720},
        {1159.5205,-1273.2915,13.2720},
        {1158.5543,-1252.6982,14.4624},
        {1158.7080,-1221.1233,17.5821},
        {1144.6757,-1219.5071,17.7342},
        {1143.9762,-1248.7240,14.7260},
        {1141.5962,-1271.5929,13.2714},
        {1093.4003,-1273.8870,13.2720},
        {1065.7538,-1272.9719,13.2299},
        {1065.2130,-1240.6503,15.5337},
        {1065.3666,-1162.0712,23.4380}
    }
};
the server crashes right after it's starting..
If I replace it with this:
pawn Код:
new Float:SweepMission[1][0][3] =
{
    {
        {1008.6558,-1156.7506,23.5620},
        {1008.6558,-1156.7506,23.5620}
    }
};
it loads, but says
Код:
Script[gamemodes/script.amx]: Run time error 17: "Invalid/unsupported P-code file format"
[0Failed to load 'gamemodes/script.amx' script.
in the server log...

the server ran fine before I added this array
Reply
#2

pawn Код:
new Float:SweepMission[2][1] =
{
        {1008.6558,-1156.7506,23.5620},
        {1008.6558,-1156.7506,23.5620}
};
If it is a checkpoint you must be providing with the size of the cp.
Reply
#3

nvm, fixed it...
if someone's interested:
3dimensional arrays must be fully initialized
pawn Код:
new Float:SweepMission[1][NUMBER][3]


edit:
Quote:
Originally Posted by Ironboy
Посмотреть сообщение
pawn Код:
new Float:SweepMission[2][1] =
{
        {1008.6558,-1156.7506,23.5620},
        {1008.6558,-1156.7506,23.5620}
};
If it is a checkpoint you must be providing with the size of the cp.
the size is specified when setting the checkpoint, and the problem on cutting of 1 dimension is that this will remove the option to add more than 1 mission to the same array, but thanks anyways
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)