     //if trying to access a semaphore that doesn't show or is inactive handle it     if(semaphore > semaphoresIndex || semaphores[semaphore].active==0)         handle_error("Wrong semaphore index in 