Ich habe ma wieder ein problem mit dem Projekt-Sunset Script,
Ich habe folgenden Error
C:\Users\XXXXX\Desktop\Projekt-Sunset.de Roleplay Skript\gamemodes\projekt_sunset.pwn(41760) : error 032: array index out of bounds (variable "RobSkill")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
In dieser Zeile:
public PlayerRobbing(playerid)
{
RobTime[playerid] ++;
if(TogglePlayerControllable(playerid,0))
{
TogglePlayerControllable(playerid, 1);
}
if(RobStatus[playerid] == 0)
{
return 1;
}
for(new r = 0; r < sizeof(RobInfo); r++)
{
if(IsPlayerInRangeOfPoint(playerid,RobInfo[r][rRaduis], RobInfo[r][rPlaceX], RobInfo[r][rPlaceY], RobInfo[r][rPlaceZ]))
{
if(RobInfo[r][rRobber] < 3)
{
RobSkill[playerid] += 5;
}
if(RobInfo[r][rRobber] > 3)
{
RobSkill[rRobber] += 2; // Das ist die Fehler Zeile
}
if(RobInfo[r][rType] == 1)
{
if(RobTime[playerid] == 180)
{
GameTextForPlayer(playerid, "Dein Rob ist beendet",5000,3);
RobStatus[playerid] = 0;
SavedRobMoney[playerid] = 1;
RobTime[playerid] = 0;
KillTimer(robbing[playerid]);
return 1;
}
if(RobSkill[playerid] > 1)
{
PlayerRobMoney[playerid] += 25;
}
if(RobSkill[playerid] > 50)
{
PlayerRobMoney[playerid] += 50;
}
if(RobSkill[playerid] > 100)
{
PlayerRobMoney[playerid] += 75;
}
if(RobSkill[playerid] > 150)
{
PlayerRobMoney[playerid] += 80;
}
if(RobSkill[playerid] > 300)
{
PlayerRobMoney[playerid] += 110;
}
return 1;
}
if(RobInfo[r][rType] == 2)
{
if(RobTime[playerid] == 120)
{
GameTextForPlayer(playerid, "Dein Rob ist beendet",5000,3);
RobStatus[playerid] = 0;
SavedRobMoney[playerid] = 1;
RobTime[playerid] = 0;
KillTimer(robbing[playerid]);
return 1;
}
if(RobSkill[playerid] > 1)
{
PlayerRobMoney[playerid] += 25;
}
if(RobSkill[playerid] > 50)
{
PlayerRobMoney[playerid] += 50;
}
if(RobSkill[playerid] > 100)
{
PlayerRobMoney[playerid] += 75;
}
if(RobSkill[playerid] > 150)
{
PlayerRobMoney[playerid] += 80;
}
if(RobSkill[playerid] > 300)
{
PlayerRobMoney[playerid] += 110;
}
return 1;
}
if(RobInfo[r][rType] == 3 )
{
if(RobTime[playerid] == 300)
{
GameTextForPlayer(playerid, "Dein Rob ist beendet",5000,3);
RobStatus[playerid] = 0;
SavedRobMoney[playerid] = 1;
RobTime[playerid] = 0;
KillTimer(robbing[playerid]);
return 1;
}
if(RobSkill[playerid] > 1)
{
PlayerRobMoney[playerid] += 25;
}
if(RobSkill[playerid] > 50)
{
PlayerRobMoney[playerid] += 50;
}
if(RobSkill[playerid] > 100)
{
PlayerRobMoney[playerid] += 75;
}
if(RobSkill[playerid] > 150)
{
PlayerRobMoney[playerid] += 80;
}
if(RobSkill[playerid] > 300)
{
PlayerRobMoney[playerid] += 110;
}
return 1;
}
}
}
return 1;
}
Ich habe direct den ganzen Public geschickt, fals Fragen kommen.
Danke schonmal für die Hilfe.
MFG
Me