Hallo ich hab ein Problem ich glaube aber es müsste gehen aber es geht nicht kann mir bitte jemand helfen

ich möchte in der Function folgendes machen:
Code:
function slot1tog1()
{
	
	if(slot1 > 0 && obj_mouse == 0)
	{
		obj_mouse = slot1;
		slot1 = 0;
	}
	if(slot1 == 0)
	{
		slot1 = obj_mouse;
		obj_mouse = 0;
	}
	if(slot1 > 0 && obj_mouse > 0)
	{
		obj_mouse_sav = slot1;
		slot1 = obj_mouse;
		obj_mouse = obj_mouse_sav;
	}
}



aber es macht nur das was in der ersten if steht und wenn die erste nicht Wahr ist dann passiert garnichts.

und wenn ichs so mach:
Code:
function slot1tog1()
{
	
	if(slot1 > 0 && obj_mouse == 0)
	{
		obj_mouse = slot1;
		slot1 = 0;
	}
}
function slot1tog2()
{
	if(slot1 == 0)
	{
		slot1 = obj_mouse;
		obj_mouse = 0;
	}
}
function slot1tog3()
{
	if(slot1 > 0 && obj_mouse > 0)
	{
		obj_mouse_sav = slot1;
		slot1 = obj_mouse;
		obj_mouse = obj_mouse_sav;
	}
}

PANEL* BOTTOM_SLOT1_on =
{
	pos_x = 550; pos_y = 200;
	button(0,0,SLOT_OVER,SLOT_ON,SLOT_OVER,slot1tog1,slotname_re,slot1name);
	flags =  SHOW;
	layer = 2;
}

PANEL* BOTTOM_SLOT1_off =
{
	pos_x = 550; pos_y = 200;
	button(0,0,SLOT_OVER,SLOT_ON,SLOT_OVER,slot1tog2,slotname_re,slot1name);
	flags =  SHOW;
	layer = 2;
}

PANEL* BOTTOM_SLOT1_obj_m =
{
	pos_x = 550; pos_y = 200;
	button(0,0,SLOT_OVER,SLOT_ON,SLOT_OVER,slot1tog3,slotname_re,slot1name);
	flags =  SHOW;
	layer = 2;
}



dann funktioniert es.

was könnte das problem sein?

danke im voraus

MfG

Patrick