Please describe your problem in more detail. What do you mean by "when I put this in a void"? The following code compiles perfectly fine:
Code:
#include <acknex.h>

void goto_encounter()
{
	//put player in the encounter room
	player.x = 0;
	player.y = 0;
	player.z = -300;
}



Always learn from history, to be sure you make the same mistakes again...