OnPlayerSpawn Array index of Bounds
#1

[18:00:10] [debug] Run time error 4: "Array index out of bounds"
[18:00:10] [debug] Accessing element at index 193 past array upper bound 13
[18:00:10] [debug] AMX backtrace:
[18:00:10] [debug] #0 000c0c58 in ?? (0) from ESS2.amx
[18:00:10] [debug] #1 0002297c in public OnPlayerSpawn (0) from ESS2.amx


Player Spawns only here
https://www.imgx.ro/view.php?id=243752



public OnPlayerSpawn(playerid)
{
ShowZonesForPlayer(playerid); God_Mode_Verify(playerid);
SetPlayerInterior(playerid, 0); SetPlayerSpecialAction(playerid, 0);
SetPlayerVirtualWorld(playerid, 0); SavePlayer(playerid);
CosminInfo[playerid][AFKBRB] = 0; CosminInfo[playerid][Spawned] = 1;
TextDrawHideForPlayer(playerid,BRB[0]);
ConnectTDHide(playerid);
PlayerPlaySound(playerid, 1063, 0.0, 0.0, 0.0);
if(CosminInfo[playerid][HideTDS] == 0) TextDrawShowForPlayer(playerid, WES_TD[0]), TextDrawShowForPlayer(playerid, WES_TD[1]), TextDrawShowForPlayer(playerid, WES_TD[2]), TextDrawShowForPlayer(playerid, WES_TD[3]), TextDrawShowForPlayer(playerid, WES_TD[4]), TextDrawShowForPlayer(playerid, WES_TD[5]), TextDrawShowForPlayer(playerid, liTeleTD); //TextDrawShowForPlayer(playerid, Pont[0]), TextDrawShowForPlayer(playerid, Pont[1]), TextDrawShowForPlayer(playerid, Pont[2]);
//--------------------------------------------------------------------------
SetPlayerCheckpoint(playerid, 1319.1544,1249.3938,10.8203, 2.0);
//--------------------------------------------------------------------------
switch(CosminInfo[playerid][Language])
{
case 0: PlayerTextDrawShow(playerid, Random_TD_Texts);
case 1: PlayerTextDrawShow(playerid, Random_TD_Texts_RO);
}
//--------------------------------------------------------------------------
if(ClanInfo[CosminInfo[playerid][ClanID]][SpawnX] != 0)
{
SetPlayerPos(playerid, ClanInfo[CosminInfo[playerid][ClanID]][SpawnX], ClanInfo[CosminInfo[playerid][ClanID]][SpawnY], ClanInfo[CosminInfo[playerid][ClanID]][SpawnZ]);
SetPlayerFacingAngle(playerid, ClanInfo[CosminInfo[playerid][ClanID]][SpawnA]);
}
//--------------------------------------------------------------------------
if(ClanInfo[CosminInfo[playerid][ClanID]][SpawnX] == 0)
{
new rSpawn = random(; switch(rSpawn)
{
case 0: SetPlayerPos(playerid, -70.0371,2502.8616,16.6314 ); // AA
case 1: SetPlayerPos(playerid, 1942.1929,-2383.1050,13.6628 ); // LSAir
case 2: SetPlayerPos(playerid, -1369.4698,-478.3749,14.2305 ); // SFAir
case 3: SetPlayerPos(playerid, 1315.9774,1277.6951,10.8203 ); // LVAir
case 4: SetPlayerPos(playerid, -2340.3953,-1602.7417,483.7599 ); // Chilliad
case 5: SetPlayerPos(playerid, 1420.3746,2773.9958,11.0972 ); // Stunt Golf
case 6: SetPlayerPos(playerid, -2227.6587,2326.2891,7.5894 ); // Pimps
case 7: SetPlayerPos(playerid, -2639.6819,1356.3484,7.1629 ); // Jizzy's
case 8: SetPlayerPos(playerid, 356.9382,-1840.1594,3.7349 ); // Beach
}
}
//--------------------------------------------------------------------------
if(CosminInfo[playerid][Jailed] != 0)
{
SendClientMessage(playerid, COLOR_ULTRARED, "You cannot escape from Jail! You have to wait a few minutes.");
SetTimerEx("Jailing", 1000, 0, "i", playerid);
}
//--------------------------------------------------------------------------
mysql_tquery(DB_Connect, "SELECT * FROM `Clans`", "LoadClans", "");
//--------------------------------------------------------------------------
if(CosminInfo[playerid][GangID] != 0)
{
SetupPlayerForGang(playerid, CosminInfo[playerid][GangID]);
}
//--------------------------------------------------------------------------
if(CosminInfo[playerid][ClanID] != 0)
{
SetupPlayerForClan(playerid, CosminInfo[playerid][ClanID]);
}
//--------------------------------------------------------------------------
CheckDMInfo(playerid); SetPlayerScore(playerid, GiveNote(playerid));
//--------------------------------------------------------------------------
return 1;
}
Reply


Messages In This Thread
OnPlayerSpawn Array index of Bounds - by Cezar98 - 04.08.2018, 16:10
Re: OnPlayerSpawn Array index of Bounds - by RogueDrifter - 04.08.2018, 17:59
Re: OnPlayerSpawn Array index of Bounds - by Cezar98 - 04.08.2018, 18:09
Re: OnPlayerSpawn Array index of Bounds - by RogueDrifter - 04.08.2018, 18:17
Re: OnPlayerSpawn Array index of Bounds - by Cezar98 - 04.08.2018, 18:22
Re: OnPlayerSpawn Array index of Bounds - by RogueDrifter - 04.08.2018, 18:27

Forum Jump:


Users browsing this thread: 2 Guest(s)