DayZ 1.27
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 строка 664

665 {
666 if (Count() != pOtherArray.Count())
667 {
668 ErrorEx("arrays are not the same size");
669 return -1;
670 }
671
672 for (int i = 0; i < pOtherArray.Count(); ++i)
673 {
674 if (Get(i) != pOtherArray.Get(i))
675 {
676 return i;
677 }
678 }
679
680 return -1;
681 }
override float Get()
Определения PlayerStatBase.c:134
enum ShapeType ErrorEx
proto native int Count()

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