it is my code:
The error is this:
Please, i need help, and not got idea of this error
Code:
class CheckPerkSame extends Mutator;
var KFGameType KF;
var bool bExtraChecked;
var array<Controller> players;
var int i;
function PostBeginPlay(){
if(KFGameType(level.Game) != None){
KF = KFGameType(level.Game);
SetTimer(2.0, true);
}else{
Destroy();
}
}
function Timer(){
if(KF.bWaveInProgress) { //No podriamos cambiarlo cuando el wave esta en progreso
if(!bExtraChecked) { //Chqueando otra vez, en caso de que se haya cambiado el perk en los ultimos 2 seg.
MutUpdate();
bExtraChecked = True;
}
}
else
{ //Despues de la primera wave, en el tiempo del trade
MutUpdate();
bExtraChecked = False;
}
}
function MutUpdate() {
local Controller C;
//Tomo todos los controllers que sean players.
for(C=lever.ControllerList; C != None; C.NextController) {
if(C.bIsPlayer && C.Pawn != None && C.Pawn.Health > 0 && (C.PlayerReplicationInfo != None || KFPlayerReplicationInfo(C.PlayerReplicationInfo) != None))
players[players.length] = C;
}
}
function CheckPlayersPerk() {
local string playerName;
local class<KFVeterancyTypes> myVetType;
local bool bSameType;
local int i;
local int j;
local int pLength;
pLength = players.length;
for( i=0; i<pLength; i++ ) {
//Guardo el player a chequear contra todos los demas que estan en el server.
playerName = KFPlayerReplicationInfo(player[i].PlayerReplicationInfo).PlayerName;
myVetType = KFPlayerReplicationInfo(player[i].PlayerReplicationInfo).ClientVeteranSkill;
for(j=0; j<pLength; j++ )
//Si no es el mismo que estoy chequeando && tienen el mismo perk
if(j != i && myVetType != KFPlayerReplicationInfo(player[j].PlayerReplicationInfo).ClientVeteranSkill)
//LO MATO :D
player[j].Pawn.Health = 0;
}
}
defaultproperties {
bAddToServerPackages=True
Description="Restricts the use only one perk per player, players whith same perk, kill instatly.||By [LB]Fede_mer-k LastBullet clan 1/2016"
FriendlyName="Check Perk Same"
GroupName="PerkRestrictions"
}
The error is this:
Code:
Warning Line 45: 'i' obscures 'i' defined in the base class
Error Line 52 : Bad or missing expression in '='
Please, i need help, and not got idea of this error