Hey guys laugh
Ive got a problem and stuck now over 2 days. I have a simple function in my game, and I call it to respawn people. When I call the wait(-10) or any other wait, the function is terminating itself o_0
So before wait is an error box, after it nothing happens. Yes, Im using proc_kill in my game, but just with function pointers and not in my netcode at all. Please help me frown

Code:
function net_respawnPlayer(var time, var id)
{
	createWeapon(id);
	
	wait(-time);
	
	pHealth[id] = 100;
	pPlayer[id].health = pHealth[id];
	enet_sendto(&(pPlayer[id].health), sizeof(int), BROADCAST);
.......