Here, this should work. It compiles all fine, though having never used this function, nor tried this out in-game I don't know if it works or not. But it should...
Code:
void main()
{
object oPC = GetFirstPC();
object oLightsaber = GetObjectByTag("g_w_lghtsbr01");
ActionTakeItem(oLightsaber, oPC);
}