Was not declared in this scope23

hi.after i compile the following error" 'pushMatrix' was not declared in this scope " comes up.what should i do?

void drawObject() {
translate(960,1000); // moves the starting coordinats to new location
stroke(255,10,10); // red color
pixsDistance = iDistance*22.5;


Start by reading How to get the best out of this forum and post a complete sketch illustrating the problem, using code tags when you do

I strongly suspect that you have a missing } at the end of a function, quite possibly the loop() function, but my crystal ball is cloudy beyond that

i don't see translate(), strokeweight(), stroke() pixsDistance() iDistance, iAngle or popMatrix() declared in the code you posted either
... nor line()

If you use the IDE autoformat tool (ctrl-t or Tools, Auto format) you should be able to see the location of the missing or misplaced curly bracket. If that does not help, post the whole code, in code tags, and we can help sort out the errors. Auto format the code before posting.

pushMatrix() is not declared at all in the tiny code snippet you posted. If you post the complete program it may be possible to help. Otherwise the best I can offer is "You need to declare pushMatrix() somewhere".