Code:
void SpeedRun_GoGoGo ()
{
	BMAP * SpeedRun_TEMP;
	int SpeedRun_i = integer(random(6));
	int SpeedRun_Row = 1;
	int SpeedRun_Trys = 0;
	int SpeedRun_Wrong = 0;
	SpeedRun_TEMP = SpeedRun_Shapes[SpeedRun_i];
	SpeedRun_Previous = SpeedRun_i;
	
	pan_setwindow(SpeedRun_ControlsPlaying,1,200,150,200,200,SpeedRun_TEMP,200,200);
	pan_setstring(SpeedRun_ControlsPlaying,4,-100,-100,"",str_create(""));
	pan_setbutton(SpeedRun_ControlsPlaying,1,0,-100,-100,bmap_create("button1.tga"),bmap_create("button1.tga"),bmap_create("button1.tga"),NULL,NULL,NULL,NULL);
	SpeedRun_Time = 60;
	SetTimer (SpeedRun_Time,1,NULL);
	while(SpeedRun_Time != 0)
	{
		if(key_cur)//Same
		{
			if(SpeedRun_Previous == SpeedRun_i)
			{
				//Correct
				//AddUserXP(2);
				SpeedRun_Score += 5 * SpeedRun_Row;	
				SpeedRun_Row++;
			}
			else
			{
				//Wrong	
			}
		}
		else if (key_cul) //Not Same
		{
			if(SpeedRun_Previous == SpeedRun_i)
			{
				//Wrong	
			}
			else
			{
				//Correct	
			}
		}
		wait(1);
	}
}



The complete code which will help understand better.
And SpeedRun_Time is initialized with a value.

The Error is "Script Crash in SetTimer" and then Windows notifies "acknex.exe has stopped working...".

Last edited by Yashas; 11/17/12 15:02.

Keep smiling laugh
http://translation.babylon.com/ - Translate many languages