DayZ 1.29
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 строка 690

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

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