resulotion change problem

hi guys,im trying to change my game's resulotion,in a in-game option menu,so the player can set his wanted resolution,but for some reason its not working .. i wrote this: Code: if(Input.GetKeyDown("enter")) { Screen.SetResolution (wid, high, true); } wid is the width of the screen,and high is the height of the screen.. but for some reason its not working :/ why is that? and how can i fix that?

Don't worry about letting the player pick resolution. The player can pick the settings from the start of the game (simple, good, fantastic, etc) These settings are built in (and editable) when you export your game through the "Build Settings" found in Unity.