LCD HELP!!!!!

i have a 128*64 lcd with ks0108 library. i tried replacing the potentiometer between lcd pins 3 and 17 with a regular resistor of equivalent resistance and its not working.

i need it so i can place it in a project box after, is there a way to replace the potentiometer for a more stable element.

You need to use two resistors as a voltage divider. Set the potentiometer so that the display looks good then power down and read the resistance from the center tap to each end. Then pick the two closest you can find. You can use parallel and/or serial resistor circuits to get the values exact.

A better option is to get a smaller pot and use that.

is there a way to replace the potentiometer for a more stable element.

The point is that the pot value will need to be changed as the LCD ages or undergoes temperature changes. It is the LCD that is not stable not the resistor. You can't simply replace the pot with a fixed resistor and expect it to work under all circumstances.