DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ DifferentAtPosition()

int array< Class T >::DifferentAtPosition ( array< T > pOtherArray)
inlineprivate

Returns an index where 2 arrays start to differ from each other.

Возвращает
int Index from where arrays differ
array<int> arr1 = {0,1,2,3};
array<int> arr2 = {0,1,3,2};
int differsAt = arr1.DifferentAtPosition(arr2);
>> 2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto void Print(void var)
Prints content of variable to console/log.

См. определение в файле EnScript.c строка 688

689 {
690 if (Count() != pOtherArray.Count())
691 {
692 ErrorEx("arrays are not the same size");
693 return -1;
694 }
695
696 for (int i = 0; i < pOtherArray.Count(); ++i)
697 {
698 if (Get(i) != pOtherArray.Get(i))
699 {
700 return i;
701 }
702 }
703
704 return -1;
705 }
override float Get()
Определения PlayerStatBase.c:134
enum ShapeType ErrorEx
proto native int Count()

Перекрестные ссылки Count, ErrorEx и Get().