function serverCmdPatrol(%client){
%client.markerNum++;
%pos = %client.player.getPosition();
%client.patrol[%client.markerNum] = %pos;
messageclient(%client,"","\c6Marker " @ %client.markerNum @ " set at:\c0 " @ %pos @ "\c6.");
}
function Armor::onReachDestination(%this,%obj){
if(%obj.isPBot){
%client = %obj.client;
for(%i=0;%i<%client.markerNum;%i++){
if(vectorDist(%obj.getMoveDestination(),%client.patrol[%i]) < 2){
%obj.setMoveDestination(%client.patrol[%i++], 0);
if(vectorDist(%obj.getPosition(), %client.patrol[%client.markerNum]) < 2){
%obj.setMoveDestination(%client.patrol[1], 0);
}
}
}
}
}
Why's this not making them loop?