okay here is a super basic stand alone script that should in theory but doesn't. Why?

Code:
PANEL* testPNL = {
	flags = SHOW;
	digits(0,0,6.4,*,1,player.skill1);
	digits(0,10,6.4,*,1,player.skill98);
	digits(0,20,6.4,*,1,dplay_id);
	digits(0,30,6.4,*,1,player.client_id);
}

void fPlayer()
{
	while(my == NULL){wait(1);}
	player = my;
	while(connection == 0)
	{
		wait(1);
	}
	set(my,TRANSLUCENT);
	
	while(my.skill1 == 0)
	{
		wait(-1);
		if(connection == 2 && my.skill1 == 0)
		{
			my.skill98 = dplay_id;
			send_skill(my.skill98,0);
		}
	}

	wait(-0.5);

	reset(my,TRANSLUCENT);

	while(1)
	{
		wait(1);
		
		if(my.skill98 != 0 && connection != 2)
		{
			my.skill1 = 1;
			send_skill_id(my.skill98,my.skill1,0);
			my.skill98 = 0;
		}
	}
}

void main()
{
	dplay_localfunction = 2;		//run actions on both server and client
	
	level_load("valiance.wmb");
	wait(-2);
	
	#ifdef server						//if we defined this game as a server
		while(connection == 0) {wait(1);}	// wait until we have a connection
	#endif

	#ifdef client						//if we defined this game as a client
		while(connection == 0) {wait(1);}	// wait until we have a connection
	#endif
	
	if(connection == 1 || connection == 3)
	{
		player = ent_create("testing.mdl",vector(0,0,0),fPlayer);
		player.skill1 = 100;
	}
}



I've honestly been trying to get send_skill_to to work ever since I bought A7 but I have never been able to get it working properly. I've kept putting it off for ever but now I'm at the point where I need it (almost done with the game).
PLZ help.

http://www.2shared.com/file/l8VY6-BU/test.html



Last edited by PrenceOfDarkness; 12/09/10 15:52.

"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.