Error message with GPS source definition

Hello everyone! I am new with Geant4 and I need a bit of help!

I am trying to define a GPS source (more specifically a cylindrical source with uniform distribution) as follows:
/run/initialize
/control/verbose 2
#/run/verbose 1

/gps/verbose 0
/gps/particle ion
/gps/ion 43 99
/gps/pos/type Volume
/gps/pos/shape Cylinder
/gps/pos/centre 1.275 0.04 2.05 m
/gps/pos/halfz 15 cm
/gps/pos/radius 1.44 m
/gps/ang/type iso
/gps/ene/type Gauss
/gps/ene/mono 140 keV
/gps/ene/sigma 15 keV

/analysis/setFileName 99mTc_gps
/analysis/h1/set 1 150 0. 1511 keV #e+ e-
#/analysis/h1/set 2 150 0. 1511 keV #neutrino
/analysis/h1/set 3 4096 0. 3073.849 keV #gamma
#/analysis/h1/set 6 100 0. 2500 keV #EkinTot (Q)
#/analysis/h1/set 7 150 0. 15e3 keV #P balance
#/analysis/h1/set 8 100 0. 100. year #time of life
#/analysis/h1/set 9 100 1. 2. MeV #EvisTot

/rdecay01/event/printModulo 10000
/run/beamOn 100000000

But when I run it I am getting the following error message:
#/run/verbose 1

#/gun/particle ion
#/gun/ion 43 99

/gps/verbose 2
***** COMMAND NOT FOUND </gps/verbose 2> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (100)
Error code : 100
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

What am I doing wrong?

Thanks a lot for your help!

Varvara

Your question is a bit confusing as it first states /gps/verbose 0 and in the error message /gps/verbose 2. However, as far as I can see this is the first time a /gps/ command appears in your macro? Are you sure you defined G4GeneralParticleSource in your primary generator class?
I think this might be the cause of your problem.

That was exactly my problem, I forgot to define it in my primary generator class.

Thank you very much for you help!!!