I don't know if you've watched Sword Art Online but that it has a similar plot line. I know it's an anime so it's not 100% real but you can get some ideas from it if you want. Besides watching a show for research is one of the best. (If you're interested it's on Netflix and Hulu)
In SAO the exit button is taken away by the creator after everyone has put on their headsets which was probably an added code the creator put in. This kept anyone from leaving and later was announced that everyone had to clear the boss level in order to get out. If anyone tampered with the headset it would essentially turn the players brain to mush thereby killing them. The code is what tells the computer what to do when an action is done.
You've probably heard of 1's and 0's being referred to as switches, that's what code is. I'll give you an example of a line of code from my Web Design Class. A simple one is the nav bar. The bar across the top of the website that takes you to different web pages. That word you click on is linked to another html page.
For Example: Contact Us
(This is what links to the Contact us page) Contact Us (this is the word you click on) (this is the end tag)
If you forget the end tag or the ending > it might not show up on your nav bar or link properly.
A big part of computers are the code, if you can access the coding of the game and screw up some tags here a few lines of code there or insert a virus when a person does a certain action (especially if it's a common action like picking up a certain apple or opening a door) then it will infect a lot of players. And since it's a headset that taps into the brain, a malfunction can be bad if it affects that area of code. I'm not a coder but I'm taking a web design class and we're building websites from scratch with code so I have a small basis of understanding. With code, if you simply forget an end tag or parse something wrong it really screws up your code. And if you do it in crucial enough areas it won't show what is contained in the tags.
That was probably a lot more than you ever expected and the code I'm learning is web design so it's not game design but considering quite a few game are web based it might help you have a better idea or what you're looking for.