06.04.2016, 01:34
F:\PVP Server\gamemodes\pvp.pwn(403) : error 032: array index out of bounds (variable "RandomSpawns")
Can any one help me with this error, when I tried to create this command below, thats the error I recieved
CMD:joingame(playerid, params[])
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
return 1;
}
Can any one help me with this error, when I tried to create this command below, thats the error I recieved
CMD:joingame(playerid, params[])
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
return 1;
}