new engine[MAX_VEHICLES];//And use this insteadengine = 1//use the next line instead this oneengine[vid] = 1;engine[vid] = 0;