Skip to content
User Avatar
#1136
Auto-translated
Dyrman
Something like this:
function add(array, index, change)
local ar = {}
local f = 0;
for i, e in array do
if i == index then
ar= change;
f = 1;
end
if f == 1 then
ar[i+1]= e;
else
ar= e;
end;
end
return ar
end
In other words, is an array needed where all indices are integers, differing from each other by 1, and where it would be possible to insert new elements between others and delete old ones with a shift?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4