It's obviously difficult to guess your problem without having seen any code, but the following example works fine (I assume it's something you are aiming for):

Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

var speed = 50;

void change_speed(var* spd, var value)
{
	*spd = value;
}

void main()
{
	fps_max = 60;
	while(1)
	{
		if(key_space) change_speed(&speed, total_ticks);
		DEBUG_VAR(speed,20);
		wait(1);
	}
}



"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends