Basically what the title says, this code simply returns
This was how I set the world:
Code:
[debug] Run time error 4: "Array index out of bounds"
[debug] Attempted to read/write array element at negative index -1
[debug] AMX backtrace:
[debug] #0 00040bd8 in public OnPlayerKeyStateChange (0, 16, 0) from rp.amx
PHP Code:
if(IsPlayerInRangeOfPoint(playerid, 2, 203.8129,-50.1708,1001.8047)) {
SetTimerEx("UnfreezePlayer", 3000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
SetPlayerPos(playerid, Clothes[2000-GetPlayerVirtualWorld(playerid)][scOutX], Clothes[2000-GetPlayerVirtualWorld(playerid)][scOutY], Clothes[2000-GetPlayerVirtualWorld(playerid)][scOutZ]); //assuming this is the faulty line
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
cmd_me(playerid, "exits the building.");
}
PHP Code:
SetPlayerVirtualWorld(playerid, i+2000);