Thank you for your comment!
You can replace a weapon by activating the delete-mode and clicking on the weapon you want to destroy. A weird bug lets the box appear red the selected weapon is attached to. This should not happen but if you read the controles carefully you can see that we are aware of this bug. However if you click on the weapon its going to dissapear and should make space for a new one.
You also said a giant robot destroyed your base when you tried to rebuild your weapons, this happens because you only have 60 seconds to build/upgrade your base after each wave. Once the time runs out your defense has to be ready for the fight.
I hope i was able to explain some mechanics and if this was not what you meant please consider to write a new comment with some further explanation.
Thank you for your kind review.