In a tokamak with a toroidal electric field, electrons that exceed the critical velocity are freely accelerated and can reach very high energies. These so-called `runaway electrons' can cause severe damage to the vacuum vessel and are a dangerous source of hard X-rays. Here the effect of toroidal electric and magnetic field changes on the characteristics of runaway electrons is reported. A possible technique for runaways diagnosis is the detection of hard X-ray radiation; for this purpose, a scintillator (NaI) was used. Because of the high loop voltage at the beginning of a plasma, this investigation was carried out on toroidal electric field changes in the first 5 ms interval from the beginning of the plasma. In addition, the toroidal magnetic field was monitored for the whole discharge time. The results indicate that with increasing toroidal electric field the mean energy of runaway electrons rises, and also an increase in the toroidal magnetic field can result in a decrease in intensity of magnetohydrodynamic oscillations which means that for both conditions more of these high-energy electrons will be generated.