Stata code for linear regression that controls for state effects
Here's a guess about what has gone wrong, since what you wrote down will get you a different error message.

I would bet dollars to donuts that you left out the the reg (short for regress) from:  

xi: reg sust_all form_type_dum EDUCPAY HAZARDPAY SHIFTPAY SKILLPAY MILPAY COLLBARG RESPAY CHIEFMAX  OPBUDGET OPBUDGEST POPULATION i.STATE, robust


Also, unless your version of Stata is ancient, you don't need xi:, so just type:

reg sust_all form_type_dum EDUCPAY HAZARDPAY SHIFTPAY SKILLPAY MILPAY COLLBARG RESPAY CHIEFMAX  OPBUDGET OPBUDGEST POPULATION i.STATE, robust


Stata will handle the state FEs for you.