Code:

if(player.exp < 2000)
{getmonster = 2;}
else {
if(player.exp < 3000)
{getmonster = 3;}
else {
if(player.exp < 4000)
{getmonster = 4;}
else {
if(player.exp < 5000)
{getmonster = 5;}
else {
if(player.exp < 6000)
{getmonster = 6;}
else {
if(player.exp < 7000)
{getmonster = 7;}
else {
if(player.exp < 8000)
{getmonster = 8;}
else {
if(player.exp < 9000)
{getmonster = 9;}
else {
if(player.exp < 10000)
{getmonster = 10;}
}}}}}}}}

no you can't do that.

Code:

if(player.exp < 2000)
{getmonster = 2;}
else if(player.exp < 3000){
getmonster = 3;}
else if(player.exp < 4000){
getmonster = 4;}
else if(player.exp < 5000)
{getmonster = 5;}
else if(player.exp < 6000)
{getmonster = 6;}
else if(player.exp < 7000)
{getmonster = 7;}
else if(player.exp < 8000)
{getmonster = 8;}
else if(player.exp < 9000)
{getmonster = 9;}
else if(player.exp < 10000)
{getmonster = 10;}

Each 'if' or 'else if' needs it's own open and closed set of parentheses. You can't close them all at the end like you did.